From 55047b668759f3dab4aede28fff1dbfbd0313292 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Mon, 16 Nov 2020 05:46:49 +0200 Subject: [PATCH] Fix network status when no base dc id in LS --- src/components/chat/input.ts | 2 +- src/lib/appManagers/appDialogsManager.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/chat/input.ts b/src/components/chat/input.ts index 64405166..5d2d99a1 100644 --- a/src/components/chat/input.ts +++ b/src/components/chat/input.ts @@ -589,7 +589,7 @@ export class ChatInput { //let str = this.serializeNodes(Array.from(this.messageInput.childNodes)); let str = getRichValue(this.messageInput); - console.log('childnode str after:', str/* , getRichValue(this.messageInput) */); + //console.log('childnode str after:', str/* , getRichValue(this.messageInput) */); //return; diff --git a/src/lib/appManagers/appDialogsManager.ts b/src/lib/appManagers/appDialogsManager.ts index 273864c5..6387e73a 100644 --- a/src/lib/appManagers/appDialogsManager.ts +++ b/src/lib/appManagers/appDialogsManager.ts @@ -20,7 +20,7 @@ import {MyDialogFilter as DialogFilter} from "../storages/filters"; import appPeersManager from './appPeersManager'; import appStateManager from "./appStateManager"; import appUsersManager, { User } from "./appUsersManager"; -import { MOUNT_CLASS_TO } from "../mtproto/mtproto_config"; +import { App, MOUNT_CLASS_TO } from "../mtproto/mtproto_config"; import Button from "../../components/button"; import SetTransition from "../../components/singleTransition"; import AppStorage from '../storage'; @@ -94,6 +94,10 @@ class ConnectionStatusComponent { const setConnectionStatus = () => { AppStorage.get('dc').then(baseDcID => { + if(!baseDcID) { + baseDcID = App.baseDcID; + } + if(setFirstConnectionTimeout) { clearTimeout(setFirstConnectionTimeout); setFirstConnectionTimeout = 0;