набурмалдил

This commit is contained in:
Jganenok
2026-05-29 13:52:13 +07:00
parent b3a7fd081c
commit 0a23b33cfd
9 changed files with 369 additions and 108 deletions
+14
View File
@@ -937,6 +937,20 @@ class AccountModule {
_checkPacketError(packet, 'authorizeWebQrLogin');
}
Future<void> beginAddAccount() async {
try {
await _api.disconnect();
} catch (_) {}
await TokenStorage.clearActiveAccount();
ContactCache.clear();
TranscriptionCache.clear();
ChatsModule.resetForAccountSwitch();
logger.i('Добавление аккаунта: сессия сброшена, активный аккаунт очищен');
}
Future<ProfileData> switchAccount(int accountId) async {
final profile = await AppDatabase.loadProfile(accountId);
if (profile == null) {