From 59f98aecd99cbc1eadf93a52409049c04e571c58 Mon Sep 17 00:00:00 2001 From: csaurus Date: Sun, 22 Apr 2018 16:12:34 -0400 Subject: [PATCH] Stop blink from loading more statuses with every scroll. --- src/components/timeline/timeline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 74ab85d37d..674352a54a 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -105,7 +105,8 @@ const Timeline = { .then((friends) => this.$store.dispatch('addFriends', { friends })) }, scrollLoad (e) { - const height = Math.max(document.body.offsetHeight, document.body.scrollHeight) + const bodyBRect = document.body.getBoundingClientRect(); + const height = Math.max(bodyBRect.height, -(bodyBRect.y)) if (this.timeline.loading === false && this.$store.state.config.autoLoad && this.$el.offsetHeight > 0 &&