refs #145 Archive old statuses when close timeline
This commit is contained in:
parent
060427f899
commit
4601930604
@ -25,6 +25,9 @@ export default {
|
||||
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline) {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.commit('TimelineSpace/archiveHomeTimeline')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -25,6 +25,9 @@ export default {
|
||||
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications) {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.commit('TimelineSpace/archiveNotifications')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -83,6 +83,12 @@ const TimelineSpace = {
|
||||
},
|
||||
clearNotifications (state) {
|
||||
state.notifications = []
|
||||
},
|
||||
archiveHomeTimeline (state) {
|
||||
state.homeTimeline = state.homeTimeline.slice(0, 40)
|
||||
},
|
||||
archiveNotifications (state) {
|
||||
state.notifications = state.notifications.slice(0, 40)
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user