Maintain simplicity by using only one variable instead of two

This commit is contained in:
JC Brand 2018-01-16 14:56:58 +01:00
parent f1c8de15d1
commit 95bf69b8a9

View File

@ -999,13 +999,6 @@
* received. * received.
*/ */
if (ev && ev.preventDefault) { ev.preventDefault(); } if (ev && ev.preventDefault) { ev.preventDefault(); }
if (this.model.get('auto_scrolled')) {
this.model.set({
'scrolled': false,
'auto_scrolled': false
});
return;
}
let scrolled = true; let scrolled = true;
const is_at_bottom = const is_at_bottom =
(this.content.scrollTop + this.content.clientHeight) >= (this.content.scrollTop + this.content.clientHeight) >=
@ -1030,8 +1023,6 @@
} }
if (u.isVisible(this.content) && !this.model.get('scrolled')) { if (u.isVisible(this.content) && !this.model.get('scrolled')) {
this.content.scrollTop = this.content.scrollHeight; this.content.scrollTop = this.content.scrollHeight;
this.onScrolledDown();
this.model.save({'auto_scrolled': true});
} }
}, },