diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-23 20:59:35 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-23 20:59:35 +0200 |
commit | b579436846cca0015120aaaf07378c57671707b2 (patch) | |
tree | 94ea80d38d8f368ad066df55aaaeb763fbc175f2 /src/main/java/de | |
parent | add025afa2cb9ced9c9b8023ce95113dff506686 (diff) |
update unreadCount
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java | 9 |
1 files changed, 5 insertions, 4 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 76d13f7ed..802ee0187 100644 --- a/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java +++ b/src/main/java/de/pixart/messenger/ui/adapter/ConversationAdapter.java @@ -31,6 +31,7 @@ import de.pixart.messenger.entities.Transferable; import de.pixart.messenger.ui.ConversationFragment; import de.pixart.messenger.ui.XmppActivity; import de.pixart.messenger.ui.util.Color; +import de.pixart.messenger.ui.widget.UnreadCountCustomView; import de.pixart.messenger.utils.EmojiWrapper; import de.pixart.messenger.utils.IrregularUnicodeDetector; import de.pixart.messenger.utils.UIHelper; @@ -113,13 +114,13 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { if (unreadCount > 0) { viewHolder.unreadCount.setVisibility(View.VISIBLE); - viewHolder.unreadCount.setText(unreadCount > 99 ? "\u221E" : String.valueOf(unreadCount)); + viewHolder.unreadCount.setUnreadCount(unreadCount); } else { viewHolder.unreadCount.setVisibility(View.GONE); } if (failedCount > 0) { viewHolder.failedCount.setVisibility(View.VISIBLE); - viewHolder.failedCount.setText(failedCount > 99 ? "\u221E" : String.valueOf(failedCount)); + viewHolder.failedCount.setUnreadCount(failedCount); } else { viewHolder.failedCount.setVisibility(View.GONE); } @@ -336,8 +337,8 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> { private TextView timestamp; private TextView sender; private ImageView notificationIcon; - private TextView unreadCount; - private TextView failedCount; + private UnreadCountCustomView unreadCount; + private UnreadCountCustomView failedCount; private ImageView receivedStatus; private ImageView readStatus; private ImageView avatar; |