ConversationsAdapter: Use EmojiWrapper instead of EmojiTextView
This commit is contained in:
parent
d7c5937c20
commit
900ad2f7ef
|
@ -499,7 +499,7 @@ public class NotificationService {
|
||||||
for (Message message : messages) {
|
for (Message message : messages) {
|
||||||
Pair<String,Boolean> preview = UIHelper.getMessagePreview(mXmppConnectionService, message);
|
Pair<String,Boolean> preview = UIHelper.getMessagePreview(mXmppConnectionService, message);
|
||||||
// only show user written text
|
// only show user written text
|
||||||
if (preview.second == false) {
|
if (!preview.second) {
|
||||||
uBuilder.addMessage(preview.first);
|
uBuilder.addMessage(preview.first);
|
||||||
uBuilder.setLatestTimestamp(message.getTimeSent());
|
uBuilder.setLatestTimestamp(message.getTimeSent());
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import eu.siacs.conversations.entities.Transferable;
|
||||||
import eu.siacs.conversations.ui.ConversationActivity;
|
import eu.siacs.conversations.ui.ConversationActivity;
|
||||||
import eu.siacs.conversations.ui.XmppActivity;
|
import eu.siacs.conversations.ui.XmppActivity;
|
||||||
import eu.siacs.conversations.ui.widget.UnreadCountCustomView;
|
import eu.siacs.conversations.ui.widget.UnreadCountCustomView;
|
||||||
|
import eu.siacs.conversations.utils.EmojiWrapper;
|
||||||
import eu.siacs.conversations.utils.UIHelper;
|
import eu.siacs.conversations.utils.UIHelper;
|
||||||
|
|
||||||
public class ConversationAdapter extends ArrayAdapter<Conversation> {
|
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);
|
TextView convName = (TextView) view.findViewById(R.id.conversation_name);
|
||||||
if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
|
if (conversation.getMode() == Conversation.MODE_SINGLE || activity.useSubjectToIdentifyConference()) {
|
||||||
convName.setText(conversation.getName());
|
convName.setText(EmojiWrapper.transform(conversation.getName()));
|
||||||
} else {
|
} else {
|
||||||
convName.setText(conversation.getJid().toBareJid().toString());
|
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);
|
final Pair<String,Boolean> preview = UIHelper.getMessagePreview(activity,message);
|
||||||
if (showPreviewText) {
|
if (showPreviewText) {
|
||||||
mLastMessage.setText(preview.first);
|
mLastMessage.setText(EmojiWrapper.transform(preview.first));
|
||||||
} else {
|
} else {
|
||||||
mLastMessageImage.setContentDescription(preview.first);
|
mLastMessageImage.setContentDescription(preview.first);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
android:layout_toRightOf="@+id/conversation_image"
|
android:layout_toRightOf="@+id/conversation_image"
|
||||||
android:paddingLeft="8dp">
|
android:paddingLeft="8dp">
|
||||||
|
|
||||||
<android.support.text.emoji.widget.EmojiTextView
|
<TextView
|
||||||
android:id="@+id/conversation_name"
|
android:id="@+id/conversation_name"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
android:layout_height="?attr/IconSize"
|
android:layout_height="?attr/IconSize"
|
||||||
android:layout_marginRight="?attr/TextSeparation"/>
|
android:layout_marginRight="?attr/TextSeparation"/>
|
||||||
|
|
||||||
<android.support.text.emoji.widget.EmojiTextView
|
<TextView
|
||||||
android:id="@+id/conversation_lastmsg"
|
android:id="@+id/conversation_lastmsg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue