From d1bd8290110a63b76b45b6490e042659a02a52ab Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 15 Sep 2020 11:00:22 +1000 Subject: [PATCH] do not trigger markRead if conversation isHidden --- js/views/conversation_view.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/views/conversation_view.js b/js/views/conversation_view.js index 4d9a2adb7..165ac3032 100644 --- a/js/views/conversation_view.js +++ b/js/views/conversation_view.js @@ -391,10 +391,7 @@ this.window.addEventListener('resize', this.onResize); this.onFocus = () => { - if ( - this.$el.css('display') !== 'none' && - this.$el.css('display') !== '' - ) { + if (!this.isHidden()) { this.markRead(); } }; @@ -2654,7 +2651,8 @@ isHidden() { return ( - this.$el.css('display') === 'none' || + (this.$el.css('display') !== 'none' && + this.$el.css('display') !== '') || this.$('.panel').css('display') === 'none' ); },