aboutsummaryrefslogtreecommitdiff
path: root/src/components/timeline/timeline.js
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2019-01-30 17:49:27 +0000
committerlambda <pleromagit@rogerbraun.net>2019-01-30 17:49:27 +0000
commit1717e700469cb6331e2905c7af0d384cf78a1188 (patch)
tree8bb0b6f4fa6c8b81c697abc3fb707e4750f66004 /src/components/timeline/timeline.js
parent0bd77149a06bcd7e0a904d0f5c2e2691996ff898 (diff)
parent7666d50d8a9eb2ef8b5a61a1689b7358ae7d93ea (diff)
Merge branch 'feat/dont-show-load-more-when-bottomed-out' into 'develop'
fix #292 dont show "load more" when bottomed out Closes #292 See merge request pleroma/pleroma-fe!496
Diffstat (limited to 'src/components/timeline/timeline.js')
-rw-r--r--src/components/timeline/timeline.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 98da8660..85e0a055 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -16,7 +16,8 @@ const Timeline = {
data () {
return {
paused: false,
- unfocused: false
+ unfocused: false,
+ bottomedOut: false
}
},
computed: {
@@ -95,7 +96,12 @@ const Timeline = {
showImmediately: true,
userId: this.userId,
tag: this.tag
- }).then(() => store.commit('setLoading', { timeline: this.timelineName, value: false }))
+ }).then(statuses => {
+ store.commit('setLoading', { timeline: this.timelineName, value: false })
+ if (statuses.length === 0) {
+ this.bottomedOut = true
+ }
+ })
}, 1000, this),
scrollLoad (e) {
const bodyBRect = document.body.getBoundingClientRect()