Reload Notification from reload button
This commit is contained in:
parent
ffa42c7e81
commit
b4ed8f5179
|
@ -26,7 +26,8 @@ export default {
|
|||
lazyLoading: state => state.TimelineSpace.Contents.Notifications.lazyLoading,
|
||||
backgroundColor: state => state.App.theme.background_color,
|
||||
heading: state => state.TimelineSpace.Contents.Notifications.heading,
|
||||
unread: state => state.TimelineSpace.Contents.Notifications.unreadNotifications
|
||||
unread: state => state.TimelineSpace.Contents.Notifications.unreadNotifications,
|
||||
startReload: state => state.TimelineSpace.HeaderMenu.reload
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
|
@ -48,6 +49,16 @@ export default {
|
|||
document.getElementById('scrollable').scrollTop = 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
startReload: function (newState, oldState) {
|
||||
if (!oldState && newState) {
|
||||
this.reload()
|
||||
.finally(() => {
|
||||
this.$store.commit('TimelineSpace/HeaderMenu/changeReload', false)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onScroll (event) {
|
||||
if (((event.target.clientHeight + event.target.scrollTop) >= document.getElementById('notifications').clientHeight - 10) && !this.lazyloading) {
|
||||
|
|
Loading…
Reference in New Issue