diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-26 21:21:38 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-26 21:44:06 +0200 |
commit | 8967b32174901a9366916226c8c5907994eb84eb (patch) | |
tree | f5f7a3da8e5da1ddd61dffd855baff2a29a93b1b /src/main/java | |
parent | ab2074927e4b808d6d69a7c52634e4492e576d83 (diff) |
show received/read markers in chatlist
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java | 16 |
1 files changed, 16 insertions, 0 deletions
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 9b204d765..476d3034d 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java @@ -93,6 +93,11 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { Message message = conversation.getLatestMessage(); int unreadcount = conversation.unreadCount(); int failedcount = conversation.failedCount(); + ImageView ReceivedStatus = (ImageView) view.findViewById(R.id.indicator_received); + ImageView ReadStatus = (ImageView) view.findViewById(R.id.indicator_read); + + ReceivedStatus.setVisibility(View.GONE); + ReadStatus.setVisibility(View.GONE); if (!conversation.isRead()) { convName.setTypeface(null, Typeface.BOLD); @@ -175,6 +180,17 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { ImageView profilePicture = (ImageView) view.findViewById(R.id.conversation_image); loadAvatar(conversation, profilePicture); + if (activity.xmppConnectionService.indicateReceived()) { + switch (message.getMergedStatus()) { + case Message.STATUS_SEND_RECEIVED: + ReceivedStatus.setVisibility(View.VISIBLE); + break; + case Message.STATUS_SEND_DISPLAYED: + ReceivedStatus.setVisibility(View.VISIBLE); + ReadStatus.setVisibility(View.VISIBLE); + break; + } + } if (conversation.getMode() == Conversation.MODE_SINGLE) { if (conversation.getIncomingChatState().equals(ChatState.COMPOSING)) { mLastMessage.setText(R.string.is_typing); |