refs #309 Clear unread mark when change account
This commit is contained in:
parent
0406280340
commit
ccd159635c
|
@ -48,6 +48,7 @@ export default {
|
|||
await this.$store.commit('TimelineSpace/Contents/Local/clearTimeline')
|
||||
await this.$store.commit('TimelineSpace/Contents/Notifications/clearNotifications')
|
||||
await this.$store.dispatch('TimelineSpace/removeShortcutEvents')
|
||||
await this.$store.dispatch('TimelineSpace/clearUnread')
|
||||
return 'clear'
|
||||
},
|
||||
async initialize () {
|
||||
|
|
|
@ -144,6 +144,9 @@ const TimelineSpace = {
|
|||
}
|
||||
)
|
||||
return 'clearAccount'
|
||||
},
|
||||
async clearUnread ({ dispatch }) {
|
||||
dispatch('TimelineSpace/SideMenu/clearUnread', {}, { root: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,11 @@ const SideMenu = {
|
|||
resolve(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
clearUnread ({ commit }) {
|
||||
commit('changeUnreadHomeTimeline', false)
|
||||
commit('changeUnreadNotifications', false)
|
||||
commit('changeUnreadLocalTimeline', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue