aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorTristan Zur <tristan.zur@ccwn.org>2015-01-11 01:09:46 +0100
committerTristan Zur <tristan.zur@ccwn.org>2015-01-11 01:40:25 +0100
commit5a860416b502833b445f10cea004735910ef0986 (patch)
tree1334b3767a292cdbd0483160a52d74978e106585 /src/main/java
parent0464a6a3fad6b6976fa924ae4307a5bf93e563c8 (diff)
Setting added for parsing emoticons or not
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java5
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java5
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 {