diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-02-08 21:24:46 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-02-08 21:24:46 +0100 |
commit | 692e0b3455635b9a97a98890b9a2484c019c7c26 (patch) | |
tree | ae7aa9e48812175573d8af70760460a9ed7331dc /src/main/java/de/pixart/messenger/ui/adapter | |
parent | a8d81dc839f6410ebafca463a785d44e1d3ea8bb (diff) |
show number of failed uploads in chat list in red bubbles
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java | 8 |
1 files changed, 8 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 600ac47eb..3fe3cceae 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java @@ -86,8 +86,10 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { ImageView imagePreview = (ImageView) view.findViewById(R.id.conversation_lastimage); ImageView notificationStatus = (ImageView) view.findViewById(R.id.notification_status); TextView mUnread = (TextView) view.findViewById(R.id.conversation_unread); + TextView mFailed = (TextView) view.findViewById(R.id.conversation_failed); Message message = conversation.getLatestMessage(); int unreadcount = conversation.unreadCount(); + int failedcount = conversation.failedCount(); String mimeType = message.getMimeType(); if (!conversation.isRead()) { @@ -137,6 +139,12 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { } else { mUnread.setVisibility(View.GONE); } + if (failedcount > 0) { + mFailed.setVisibility(View.VISIBLE); + mFailed.setText(String.valueOf(failedcount)); + } else { + mFailed.setVisibility(View.GONE); + } if (preview.second) { if (conversation.isRead()) { mLastMessage.setTypeface(null, Typeface.ITALIC); |