aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2015-08-16 17:30:06 +0200
committerlookshe <github@lookshe.org>2015-08-16 17:30:06 +0200
commitea1debd8f72903bfbcc631713d803c27be433f20 (patch)
treef1846b8b9f450cda92e7baa6c6a2d233225998b6 /src/main/java/eu/siacs/conversations/ui
parentb67060989302daf9850e84e2d4d4320e99bdfb83 (diff)
Fixes FS#12 - Move smiley replacement from UIHelper to Emojicon module
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/SettingsActivity.java8
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java5
3 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
index f3d5d8bd..df2933c9 100644
--- a/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
@@ -12,6 +12,7 @@ import de.duenndns.ssl.MemorizingTrustManager;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xmpp.XmppConnection;
+import github.ankushsachdeva.emojicon.EmojiconHandler;
import android.app.AlertDialog;
import android.app.Fragment;
@@ -165,8 +166,11 @@ public class SettingsActivity extends XmppActivity implements
}
break;
case "dont_trust_system_cas":
- xmppConnectionService.updateMemorizingTrustmanager();
- reconnectAccounts();
+ xmppConnectionService.updateMemorizingTrustmanager();
+ reconnectAccounts();
+ break;
+ case "parse_emoticons":
+ EmojiconHandler.setParseEmoticons(Settings.PARSE_EMOTICONS);
break;
}
}
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
index c42dd305..7443c0cb 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -119,8 +119,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message);
mLastMessage.setVisibility(View.VISIBLE);
imagePreview.setVisibility(View.GONE);
- boolean parseEmoticons = Settings.PARSE_EMOTICONS;
- CharSequence msgText = parseEmoticons ? UIHelper.transformAsciiEmoticons(getContext(), preview.first) : preview.first;
+ CharSequence msgText = preview.first;
mLastMessage.setText(msgText);
if (preview.second) {
if (conversation.isRead()) {
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 9699f7d4..b6979cc6 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -252,10 +252,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
viewHolder.messageBody.setText(span);
} else {
- boolean parseEmoticons = Settings.PARSE_EMOTICONS;
- viewHolder.messageBody.setText(parseEmoticons ? UIHelper
- .transformAsciiEmoticons(getContext(), message.getMergedBody())
- : formattedBody);
+ viewHolder.messageBody.setText(formattedBody);
}
} else {
String privateMarker;