diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2020-02-10 21:25:54 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2020-02-10 21:25:54 +0100 |
commit | 993fb18d520d629305d0c0da70acb53d6aa07c70 (patch) | |
tree | 2dc2e63ea41b4e118de6ecb8105f97752620e3d9 /src | |
parent | 088360b2d67d08c716a69f988282a27ccd99ba56 (diff) |
fix colored nickname failure on single chats the 2nd
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java index ef83f599b..c343f37d2 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java @@ -238,6 +238,8 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie final Transferable transferable = message.getTransferable(); boolean multiReceived = message.getConversation().getMode() == Conversation.MODE_MULTI && message.getMergedStatus() <= Message.STATUS_RECEIVED; + boolean singleReceived = message.getConversation().getMode() == Conversation.MODE_SINGLE + && message.getMergedStatus() <= Message.STATUS_RECEIVED; if (message.isFileOrImage() || transferable != null || MessageUtils.unInitiatedButKnownSize(message)) { FileParams params = message.getFileParams(); filesize = params.size > 0 ? UIHelper.filesizeToString(params.size) : null; @@ -305,7 +307,8 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie if (multiReceived) { viewHolder.username.setVisibility(View.VISIBLE); viewHolder.username.setText(UIHelper.getColoredUsername(message)); - } else { + } + if (singleReceived){ viewHolder.username.setVisibility(View.GONE); } break; |