aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-07-23 15:09:32 +0300
committerShpuld Shpuldson <shp@cock.li>2020-07-23 15:09:32 +0300
commitfdbacba36a99b1f2ef200b8194a1964d9b87f9e1 (patch)
tree26cad6cd1b573e790514268312358a179a6f4b09 /src/components
parent3598360ce55bf7701716a9974599f901ddb66bf7 (diff)
resume last lasttime instead of always friends/public
Diffstat (limited to 'src/components')
-rw-r--r--src/components/nav_panel/nav_panel.js3
-rw-r--r--src/components/side_drawer/side_drawer.js3
-rw-r--r--src/components/timeline_menu/timeline_menu.js1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/components/nav_panel/nav_panel.js b/src/components/nav_panel/nav_panel.js
index 6ed7fc33..623dfaec 100644
--- a/src/components/nav_panel/nav_panel.js
+++ b/src/components/nav_panel/nav_panel.js
@@ -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({
diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js
index e13c66db..281052e5 100644
--- a/src/components/side_drawer/side_drawer.js
+++ b/src/components/side_drawer/side_drawer.js
@@ -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({
diff --git a/src/components/timeline_menu/timeline_menu.js b/src/components/timeline_menu/timeline_menu.js
index 02c1318d..0afeb8b4 100644
--- a/src/components/timeline_menu/timeline_menu.js
+++ b/src/components/timeline_menu/timeline_menu.js
@@ -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 () {