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 {
|
export default {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
components: { Toot },
|
components: { Toot },
|
||||||
mounted () {
|
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadHomeTimeline', false)
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
timeline: state => state.TimelineSpace.homeTimeline
|
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>
|
</script>
|
||||||
|
|
|
@ -13,13 +13,18 @@ import Notification from './Cards/Notification'
|
||||||
export default {
|
export default {
|
||||||
name: 'notifications',
|
name: 'notifications',
|
||||||
components: { Notification },
|
components: { Notification },
|
||||||
mounted () {
|
|
||||||
this.$store.commit('TimelineSpace/SideMenu/changeUnreadNotifications', false)
|
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
notifications: state => state.TimelineSpace.notifications
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue