clear userId property of timeline by default in clearTimeline action
This commit is contained in:
parent
221db9f210
commit
0e9b8be88c
2 changed files with 4 additions and 3 deletions
|
@ -86,7 +86,7 @@ const Timeline = {
|
||||||
if (this.newStatusCount === 0) return
|
if (this.newStatusCount === 0) return
|
||||||
|
|
||||||
if (this.timeline.flushMarker !== 0) {
|
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.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 })
|
||||||
this.fetchOlderStatuses()
|
this.fetchOlderStatuses()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -395,8 +395,9 @@ export const mutations = {
|
||||||
state[key] = value
|
state[key] = value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearTimeline (state, { timeline }) {
|
clearTimeline (state, { timeline, excludeUserId = false }) {
|
||||||
state.timelines[timeline] = emptyTl(state.timelines[timeline].userId)
|
const userId = excludeUserId ? state.timelines[timeline].userId : undefined
|
||||||
|
state.timelines[timeline] = emptyTl(userId)
|
||||||
},
|
},
|
||||||
clearNotifications (state) {
|
clearNotifications (state) {
|
||||||
state.notifications = emptyNotifications()
|
state.notifications = emptyNotifications()
|
||||||
|
|
Loading…
Reference in a new issue