aboutsummaryrefslogtreecommitdiff
path: root/src/components/timeline/timeline.js
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2017-11-24 07:30:17 +0000
committerlambda <pleromagit@rogerbraun.net>2017-11-24 07:30:17 +0000
commit2431d35277b0c7c761bf080f0bfffa654ee4b182 (patch)
treeb88d02bfb78b4f733e71f975c5da9203468f20da /src/components/timeline/timeline.js
parent38cab5e4b695eea90b01c2866976960e9fc01128 (diff)
parent6b773902e8dae36b2c4cf4c970fd1437cfdc13bc (diff)
Merge branch 'feature/flush-timeline-with-holes' into 'develop'
Clear timeline when there's holes between old and new Closes #54 See merge request pleroma/pleroma-fe!171
Diffstat (limited to 'src/components/timeline/timeline.js')
-rw-r--r--src/components/timeline/timeline.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index be0aefc1..660a8752 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -29,6 +29,13 @@ const Timeline = {
},
newStatusCount () {
return this.timeline.newStatusCount
+ },
+ newStatusCountStr () {
+ if (this.timeline.flushMarker !== 0) {
+ 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 !== 0) {
+ 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