diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-09 20:14:45 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-09 20:14:45 +0100 |
commit | 297870eed0559ac7aec0dfd977dc9a8e381dcd3b (patch) | |
tree | 72b97d89d631e5ba116ad3a0c602e9c7d5d1595a /src/main/java/de/pixart | |
parent | c0756d5990c6bb3c779bf37e8b04c8ddf2a4e190 (diff) |
fixed sender label for empty conversations
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 1 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 24b45e158..e4e138ec2 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -471,6 +471,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl public Message getLatestMessage() { if (this.messages.size() == 0) { Message message = new Message(this, "", Message.ENCRYPTION_NONE); + message.setType(Message.TYPE_STATUS); message.setTime(getCreated()); return message; } else { diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java index 097c3b4e8..755fb4406 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java @@ -148,9 +148,11 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } else { mSenderName.setVisibility(View.GONE); } - } else { + } else if (message.getType() != Message.TYPE_STATUS) { mSenderName.setVisibility(View.VISIBLE); mSenderName.setText(activity.getString(R.string.me)+':'); + } else { + mSenderName.setVisibility(View.GONE); } } |