resume last lasttime instead of always friends/public

This commit is contained in:
Shpuld Shpuldson 2020-07-23 15:09:32 +03:00
parent 3598360ce5
commit fdbacba36a
5 changed files with 16 additions and 1 deletions

View file

@ -12,6 +12,9 @@ const NavPanel = {
return !!timelineNames()[this.$route.name]
},
timelinesRoute () {
if (this.$store.state.interface.lastTimeline) {
return this.$store.state.interface.lastTimeline
}
return this.currentUser ? 'friends' : 'public-timeline'
},
...mapState({

View file

@ -50,6 +50,9 @@ const SideDrawer = {
return this.$store.state.instance.federating
},
timelinesRoute () {
if (this.$store.state.interface.lastTimeline) {
return this.$store.state.interface.lastTimeline
}
return this.currentUser ? 'friends' : 'public-timeline'
},
...mapState({

View file

@ -26,6 +26,7 @@ const TimelineMenu = {
if (this.currentUser && this.currentUser.locked) {
this.$store.dispatch('startFetchingFollowRequests')
}
this.$store.dispatch('setLastTimeline', this.$route.name)
},
methods: {
openMenu () {