From f6e893f077df2383d860016d2a0791823903381a Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Sat, 16 Apr 2022 22:11:55 +0300 Subject: [PATCH] Rollback 'kicked' check Exclude kicked chats from chatlist --- src/lib/appManagers/appChatsManager.ts | 4 ++-- src/lib/storages/dialogs.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/appManagers/appChatsManager.ts b/src/lib/appManagers/appChatsManager.ts index 5a9db208..6764c37a 100644 --- a/src/lib/appManagers/appChatsManager.ts +++ b/src/lib/appManagers/appChatsManager.ts @@ -238,7 +238,7 @@ export class AppChatsManager { if(chat._ === 'chatForbidden' || chat._ === 'channelForbidden' || - // (chat as Chat.chat).pFlags.kicked || + (chat as any).pFlags.kicked || (chat.pFlags.left && !(chat as Chat.channel).pFlags.megagroup)) { return false; } @@ -377,7 +377,7 @@ export class AppChatsManager { || chat._ === 'chatForbidden' || chat._ === 'chatEmpty' || (chat as Chat.chat).pFlags.left - // || (chat as Chat.chat).pFlags.kicked + || (chat as any).pFlags.kicked || (chat as Chat.chat).pFlags.deactivated) { good = false; } diff --git a/src/lib/storages/dialogs.ts b/src/lib/storages/dialogs.ts index a1c8ed75..aafe16ab 100644 --- a/src/lib/storages/dialogs.ts +++ b/src/lib/storages/dialogs.ts @@ -764,9 +764,9 @@ export default class DialogsStorage { // ! chatForbidden stays for chat where you're kicked if( chat._ === 'channelForbidden' - // || chat._ === 'chatForbidden' + || chat._ === 'chatForbidden' || (chat as Chat.chat).pFlags.left - // || (chat as Chat.chat).pFlags.kicked + || (chat as any).pFlags.kicked ) { return; }