aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-11-23 09:36:51 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-11-23 09:36:51 +0100
commit900ad2f7ef852fe52aaa047022ac57cc59e2ae4f (patch)
tree17b7eb4a90d066517237727b0c66561a16892a6f
parentd7c5937c209e3e1c6f57de23d9c8b82b463e8fa3 (diff)
ConversationsAdapter: Use EmojiWrapper instead of EmojiTextView
-rw-r--r--src/main/java/eu/siacs/conversations/services/NotificationService.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java5
-rw-r--r--src/main/res/layout/conversation_list_row.xml4
3 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java
index aad1ce3..408d7f7 100644
--- a/src/main/java/eu/siacs/conversations/services/NotificationService.java
+++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java
@@ -499,7 +499,7 @@ public class NotificationService {
for (Message message : messages) {
Pair<String,Boolean> preview = UIHelper.getMessagePreview(mXmppConnectionService, message);
// only show user written text
- if (preview.second == false) {
+ if (!preview.second) {
uBuilder.addMessage(preview.first);
uBuilder.setLatestTimestamp(message.getTimeSent());
}
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 ab32e78..bf13a39 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java
@@ -26,6 +26,7 @@ import eu.siacs.conversations.entities.Transferable;
import eu.siacs.conversations.ui.ConversationActivity;
import eu.siacs.conversations.ui.XmppActivity;
import eu.siacs.conversations.ui.widget.UnreadCountCustomView;
+import eu.siacs.conversations.utils.EmojiWrapper;
import eu.siacs.conversations.utils.UIHelper;
public class ConversationAdapter extends ArrayAdapter<Conversation> {
@@ -52,7 +53,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
}
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
- convName.setText(conversation.getName());
+ convName.setText(EmojiWrapper.transform(conversation.getName()));
} else {
convName.setText(conversation.getJid().toBareJid().toString());
}
@@ -108,7 +109,7 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
final Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message);
if (showPreviewText) {
- mLastMessage.setText(preview.first);
+ mLastMessage.setText(EmojiWrapper.transform(preview.first));
} else {
mLastMessageImage.setContentDescription(preview.first);
}
diff --git a/src/main/res/layout/conversation_list_row.xml b/src/main/res/layout/conversation_list_row.xml
index 635df53..d30045c 100644
--- a/src/main/res/layout/conversation_list_row.xml
+++ b/src/main/res/layout/conversation_list_row.xml
@@ -37,7 +37,7 @@
android:layout_toRightOf="@+id/conversation_image"
android:paddingLeft="8dp">
- <android.support.text.emoji.widget.EmojiTextView
+ <TextView
android:id="@+id/conversation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -85,7 +85,7 @@
android:layout_height="?attr/IconSize"
android:layout_marginRight="?attr/TextSeparation"/>
- <android.support.text.emoji.widget.EmojiTextView
+ <TextView
android:id="@+id/conversation_lastmsg"
android:layout_width="match_parent"
android:layout_height="wrap_content"