diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 5 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 5 |
2 files changed, 8 insertions, 2 deletions
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 a44851e3..6758acb6 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -14,6 +14,7 @@ import eu.siacs.conversations.utils.UIHelper; import android.content.Context; import android.graphics.Color; import android.graphics.Typeface; +import android.preference.PreferenceManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -139,7 +140,9 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } else { if ((message.getEncryption() != Message.ENCRYPTION_PGP) && (message.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED)) { - mLastMessage.setText(Config.PARSE_EMOTICONS ? UIHelper + boolean parseEmoticons = PreferenceManager + .getDefaultSharedPreferences(activity).getBoolean("parse_emoticons", true); + mLastMessage.setText(parseEmoticons ? UIHelper .transformAsciiEmoticons(getContext(), message.getBody()) : message .getBody()); } else { 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 249edecd..88c5c93d 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -5,6 +5,7 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.Typeface; import android.net.Uri; +import android.preference.PreferenceManager; import android.text.Spannable; import android.text.SpannableString; import android.text.style.ForegroundColorSpan; @@ -225,7 +226,9 @@ public class MessageAdapter extends ArrayAdapter<Message> { viewHolder.messageBody.setVisibility(View.VISIBLE); if (message.getBody() != null) { if (message.getType() != Message.TYPE_PRIVATE) { - viewHolder.messageBody.setText(Config.PARSE_EMOTICONS ? UIHelper + boolean parseEmoticons = PreferenceManager + .getDefaultSharedPreferences(getContext()).getBoolean("parse_emoticons", true); + viewHolder.messageBody.setText(parseEmoticons ? UIHelper .transformAsciiEmoticons(getContext(), message.getMergedBody()) : message.getMergedBody()); } else { |