aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaehoon <th.dev91@gmail.com>2019-07-02 14:32:46 -0400
committertaehoon <th.dev91@gmail.com>2019-07-02 14:32:46 -0400
commit0e9b8be88caa8bb21891b2be5fe2eb1333aed345 (patch)
treec9bc3707a78a39ebfee40b669f48cd997931a05d /src
parent221db9f210b161851dd69bed87c49d0573d30e5f (diff)
clear userId property of timeline by default in clearTimeline action
Diffstat (limited to 'src')
-rw-r--r--src/components/timeline/timeline.js2
-rw-r--r--src/modules/statuses.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js
index 9dafcbd8..b1c7edf8 100644
--- a/src/components/timeline/timeline.js
+++ b/src/components/timeline/timeline.js
@@ -86,7 +86,7 @@ const Timeline = {
if (this.newStatusCount === 0) return
if (this.timeline.flushMarker !== 0) {
- this.$store.commit('clearTimeline', { timeline: this.timelineName })
+ this.$store.commit('clearTimeline', { timeline: this.timelineName, excludeUserId: true })
this.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 })
this.fetchOlderStatuses()
} else {
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 9b11a13e..e58a9b4c 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -395,8 +395,9 @@ export const mutations = {
state[key] = value
})
},
- clearTimeline (state, { timeline }) {
- state.timelines[timeline] = emptyTl(state.timelines[timeline].userId)
+ clearTimeline (state, { timeline, excludeUserId = false }) {
+ const userId = excludeUserId ? state.timelines[timeline].userId : undefined
+ state.timelines[timeline] = emptyTl(userId)
},
clearNotifications (state) {
state.notifications = emptyNotifications()