refs #138 Hide unread mark when user already opened the timeline
This commit is contained in:
parent
233eb40cdb
commit
70a2f60031
|
@ -13,13 +13,18 @@ import Toot from './Cards/Toot'
|
|||
export default {
|
||||
name: 'home',
|
||||
components: { Toot },
|
||||
mounted () {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
timeline: state => state.TimelineSpace.homeTimeline
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
||||
},
|
||||
beforeUpdate () {
|
||||
if (this.$store.state.TimelineSpace.SideMenu.unreadHomeTimeline) {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -13,13 +13,18 @@ import Notification from './Cards/Notification'
|
|||
export default {
|
||||
name: 'notifications',
|
||||
components: { Notification },
|
||||
mounted () {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
notifications: state => state.TimelineSpace.notifications
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
||||
},
|
||||
beforeUpdate () {
|
||||
if (this.$store.state.TimelineSpace.SideMenu.unreadNotifications) {
|
||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue