Reload Local timeline from reload button
This commit is contained in:
parent
adde49d8af
commit
ffa42c7e81
|
@ -26,7 +26,8 @@ export default {
|
|||
lazyLoading: state => state.TimelineSpace.Contents.Local.lazyLoading,
|
||||
backgroundColor: state => state.App.theme.background_color,
|
||||
heading: state => state.TimelineSpace.Contents.Local.heading,
|
||||
unread: state => state.TimelineSpace.Contents.Local.unreadTimeline
|
||||
unread: state => state.TimelineSpace.Contents.Local.unreadTimeline,
|
||||
startReload: state => state.TimelineSpace.HeaderMenu.reload
|
||||
})
|
||||
},
|
||||
mounted () {
|
||||
|
@ -47,6 +48,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: {
|
||||
updateToot (message) {
|
||||
this.$store.commit('TimelineSpace/Contents/Local/updateToot', message)
|
||||
|
|
Loading…
Reference in New Issue