Add loading indicator for notifications, make timelines indicate bottoming out when no more statuses
This commit is contained in:
parent
3cfbf0141f
commit
62e9525724
9 changed files with 53 additions and 10 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue