From 8d93e9c13c509446e46b6ea0bbb126e42be0f618 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 16 May 2022 23:40:51 +0300 Subject: [PATCH] set/unset threecolumn mode on login/logout --- src/modules/users.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/users.js b/src/modules/users.js index e5889fdb..f951483f 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -1,4 +1,5 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' +import { windowWidth, windowHeight } from '../services/window_utils/window_utils' import oauthApi from '../services/new_api/oauth.js' import { compact, map, each, mergeWith, last, concat, uniq, isArray } from 'lodash' import { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js' @@ -506,6 +507,8 @@ const users = { store.commit('resetStatuses') store.dispatch('resetChats') store.dispatch('setLastTimeline', 'public-timeline') + store.dispatch('setLayoutWidth', windowWidth()) + store.dispatch('setLayoutHeight', windowHeight()) }) }, loginUser (store, accessToken) { @@ -566,6 +569,9 @@ const users = { // Get user mutes store.dispatch('fetchMutes') + store.dispatch('setLayoutWidth', windowWidth()) + store.dispatch('setLayoutHeight', windowHeight()) + // Fetch our friends store.rootState.api.backendInteractor.fetchFriends({ id: user.id }) .then((friends) => commit('addNewUsers', friends))