Skip to content

Commit

Permalink
Prevent 'mark read on scroll' during fetches
Browse files Browse the repository at this point in the history
FREEBIE
  • Loading branch information
scottnonnenberg committed Jun 1, 2017
1 parent 5194b88 commit 944ae29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/views/conversation_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@
},

onLazyScroll: function() {
if (!this.isHidden() && window.isFocused()) {
// The in-progress fetch check is important, because while that happens, lots
// of messages are added to the DOM, one by one, changing window size and
// generating scroll events.
if (!this.isHidden() && window.isFocused() && !this.inProgressFetch) {
this.markRead();
}
},
Expand Down

0 comments on commit 944ae29

Please sign in to comment.