Merge pull request #1340 from Bilb/fix-read-receipt-hidden

do not trigger markRead if conversation isHidden
pull/1343/head
Audric Ackermann 5 years ago committed by GitHub
commit c4241dc2df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -391,10 +391,7 @@
this.window.addEventListener('resize', this.onResize); this.window.addEventListener('resize', this.onResize);
this.onFocus = () => { this.onFocus = () => {
if ( if (!this.isHidden()) {
this.$el.css('display') !== 'none' &&
this.$el.css('display') !== ''
) {
this.markRead(); this.markRead();
} }
}; };
@ -2654,7 +2651,8 @@
isHidden() { isHidden() {
return ( return (
this.$el.css('display') === 'none' || (this.$el.css('display') !== 'none' &&
this.$el.css('display') !== '') ||
this.$('.panel').css('display') === 'none' this.$('.panel').css('display') === 'none'
); );
}, },

Loading…
Cancel
Save