Browse Source

Timeout for t.me log out

master
Eduard Kuzmenko 4 years ago
parent
commit
656cac5572
  1. 6
      src/lib/mtproto/mtprotoworker.ts

6
src/lib/mtproto/mtprotoworker.ts

@ -28,6 +28,7 @@ import AppStorage from '../storage'; @@ -28,6 +28,7 @@ import AppStorage from '../storage';
import appRuntimeManager from '../appManagers/appRuntimeManager';
import { SocketProxyTask } from './transports/socketProxied';
import telegramMeWebManager from './telegramMeWebManager';
import { pause } from '../../helpers/schedulers';
type Task = {
taskId: number,
@ -103,7 +104,10 @@ export class ApiManagerProxy extends CryptoWorkerMethods { @@ -103,7 +104,10 @@ export class ApiManagerProxy extends CryptoWorkerMethods {
Promise.all([
AppStorage.toggleStorage(false),
sessionStorage.clear(),
telegramMeWebManager.setAuthorized(false),
Promise.race([
telegramMeWebManager.setAuthorized(false),
pause(3000)
]),
webPushApiManager.forceUnsubscribe()
]).finally(() => {
appRuntimeManager.reload();

Loading…
Cancel
Save