attempt to recognize when holes in timeline for various reasons, clear timeline and fetch older when showing new to get rid of holes

This commit is contained in:
shpuld 2017-11-21 16:12:47 +02:00
parent 8020363680
commit fc1736618b
5 changed files with 31 additions and 5 deletions

View file

@ -29,6 +29,13 @@ const Timeline = {
},
newStatusCount () {
return this.timeline.newStatusCount
},
newStatusCountStr () {
if (this.timeline.flushMarker) {
return ''
} else {
return ` (${this.newStatusCount})`
}
}
},
components: {
@ -64,8 +71,14 @@ const Timeline = {
},
methods: {
showNewStatuses () {
this.$store.commit('showNewStatuses', { timeline: this.timelineName })
this.paused = false
if (this.timeline.flushMarker) {
this.$store.commit('clearTimeline', { timeline: this.timelineName })
this.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 })
this.fetchOlderStatuses()
} else {
this.$store.commit('showNewStatuses', { timeline: this.timelineName })
this.paused = false
}
},
fetchOlderStatuses () {
const store = this.$store