fix non-timeline routes breaking current/previous timeline

This commit is contained in:
Shpuld Shpuldson 2020-07-28 09:40:04 +03:00
parent fdbacba36a
commit e86c5ea1fa
2 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<template>
<div :class="classes.root">
<div :class="classes.header">
<TimelineMenu />
<TimelineMenu v-if="!embedded" />
<div
v-if="timelineError"
class="loadmore-error alert error"

View file

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