clear userId property of timeline by default in clearTimeline action

このコミットが含まれているのは:
taehoon 2019-07-02 14:32:46 -04:00
コミット 0e9b8be88c
2個のファイルの変更4行の追加3行の削除

ファイルの表示

@ -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 {

ファイルの表示

@ -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()