Откат мультисессии: возвращен один активный сеанс

This commit is contained in:
AidarKC
2026-05-14 17:11:24 +03:00
parent 94263a46bd
commit 0fdb5b245c
6 changed files with 3 additions and 231 deletions
+1 -7
View File
@@ -30,7 +30,6 @@ import {
markIncomingReadByBaseKey,
markOutgoingReadByBaseKey,
setContacts,
cancelAddAccountFlow,
} from './state.js';
import * as startView from './pages/start-view.js';
@@ -45,7 +44,6 @@ import * as loginPasswordView from './pages/login-password-view.js';
import * as keyStorageView from './pages/key-storage-view.js';
import * as profileView from './pages/profile-view.js';
import * as accountSwitcherView from './pages/account-switcher-view.js';
import * as profileEditView from './pages/profile-edit-view.js';
import * as walletView from './pages/wallet-view.js';
import * as settingsView from './pages/settings-view.js';
@@ -85,7 +83,6 @@ const routes = {
'login-password-view': loginPasswordView,
'key-storage-view': keyStorageView,
'profile-view': profileView,
'account-switcher-view': accountSwitcherView,
'profile-edit-view': profileEditView,
'wallet-view': walletView,
'settings-view': settingsView,
@@ -679,13 +676,10 @@ function renderApp() {
return;
}
if (state.session.isAuthorized && PRE_AUTH_PAGES.includes(pageId) && !state.accountAddingMode) {
if (state.session.isAuthorized && PRE_AUTH_PAGES.includes(pageId)) {
navigate('messages-list');
return;
}
if (state.session.isAuthorized && !PRE_AUTH_PAGES.includes(pageId) && state.accountAddingMode) {
cancelAddAccountFlow();
}
const page = routes[pageId] || routes['start-view'];