mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
Fix Vue error when navigating to channels via InlineChannel.
This commit is contained in:
parent
2a6c57abaa
commit
0c49f025b4
1 changed files with 5 additions and 2 deletions
|
@ -64,7 +64,7 @@ router.beforeEach((to, from, next) => {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach((to) => {
|
||||||
if (store.state.appLoaded) {
|
if (store.state.appLoaded) {
|
||||||
if (window.innerWidth <= constants.mobileViewportPixels) {
|
if (window.innerWidth <= constants.mobileViewportPixels) {
|
||||||
store.commit("sidebarOpen", false);
|
store.commit("sidebarOpen", false);
|
||||||
|
@ -73,7 +73,10 @@ router.afterEach(() => {
|
||||||
|
|
||||||
if (store.state.activeChannel) {
|
if (store.state.activeChannel) {
|
||||||
const channel = store.state.activeChannel.channel;
|
const channel = store.state.activeChannel.channel;
|
||||||
|
|
||||||
|
if (to.name !== "RoutedChat") {
|
||||||
store.commit("activeChannel", null);
|
store.commit("activeChannel", null);
|
||||||
|
}
|
||||||
|
|
||||||
// When switching out of a channel, mark everything as read
|
// When switching out of a channel, mark everything as read
|
||||||
if (channel.messages.length > 0) {
|
if (channel.messages.length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue