refs #309 Clear unread mark when change account

This commit is contained in:
AkiraFukushima 2018-05-17 22:02:59 +09:00
parent 0406280340
commit ccd159635c
3 changed files with 9 additions and 0 deletions

View File

@ -48,6 +48,7 @@ export default {
await this.$store.commit('TimelineSpace/Contents/Local/clearTimeline') await this.$store.commit('TimelineSpace/Contents/Local/clearTimeline')
await this.$store.commit('TimelineSpace/Contents/Notifications/clearNotifications') await this.$store.commit('TimelineSpace/Contents/Notifications/clearNotifications')
await this.$store.dispatch('TimelineSpace/removeShortcutEvents') await this.$store.dispatch('TimelineSpace/removeShortcutEvents')
await this.$store.dispatch('TimelineSpace/clearUnread')
return 'clear' return 'clear'
}, },
async initialize () { async initialize () {

View File

@ -144,6 +144,9 @@ const TimelineSpace = {
} }
) )
return 'clearAccount' return 'clearAccount'
},
async clearUnread ({ dispatch }) {
dispatch('TimelineSpace/SideMenu/clearUnread', {}, { root: true })
} }
} }
} }

View File

@ -37,6 +37,11 @@ const SideMenu = {
resolve(res) resolve(res)
}) })
}) })
},
clearUnread ({ commit }) {
commit('changeUnreadHomeTimeline', false)
commit('changeUnreadNotifications', false)
commit('changeUnreadLocalTimeline', false)
} }
} }
} }