From fdf04f6229f507bab55c834908569f81572b38ca Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 23 May 2017 12:34:56 -0700 Subject: [PATCH] Ensure that we never show last seen indicator if count is zero FREEBIE --- js/views/conversation_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 701df2812..62f8f605d 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -269,9 +269,9 @@ var oldestUnread = this.model.messageCollection.find(function(model) { return model.get('unread'); }); + var unreadCount = this.model.get('unreadCount'); - if (oldestUnread) { - var unreadCount = this.model.get('unreadCount'); + if (oldestUnread && unreadCount > 0) { this.lastSeenIndicator = new Whisper.LastSeenIndicatorView({count: unreadCount}); var unreadEl = this.lastSeenIndicator.render().$el;