From 75d78770db8d8eee1ae46b6562270dbf87de72c7 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 11 Jan 2023 20:58:07 +0400 Subject: [PATCH 1/2] Don't wait for network in the chat list initialization --- submodules/ChatListUI/Sources/Node/ChatListNode.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/ChatListUI/Sources/Node/ChatListNode.swift b/submodules/ChatListUI/Sources/Node/ChatListNode.swift index 10271ba496..045bc6ba5e 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListNode.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListNode.swift @@ -1371,7 +1371,7 @@ public final class ChatListNode: ListView { let suggestPasswordSetup: Signal if case .chatList(groupId: .root) = location, chatListFilter == nil { - suggestPasswordSetup = combineLatest( + suggestPasswordSetup = .single(false) |> then(combineLatest( getServerProvidedSuggestions(account: context.account), context.engine.auth.twoStepVerificationConfiguration() ) @@ -1389,7 +1389,7 @@ public final class ChatListNode: ListView { return false } return suggestions.contains(.setupPassword) - } + }) |> distinctUntilChanged } else { suggestPasswordSetup = .single(false) From d8558c58b327d68f556c9bddf81564395c136745 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 11 Jan 2023 20:58:14 +0400 Subject: [PATCH 2/2] Add more logs --- Telegram/NotificationService/Sources/NotificationService.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/NotificationService/Sources/NotificationService.swift b/Telegram/NotificationService/Sources/NotificationService.swift index 67a323248d..d1529a3c8f 100644 --- a/Telegram/NotificationService/Sources/NotificationService.swift +++ b/Telegram/NotificationService/Sources/NotificationService.swift @@ -1434,7 +1434,10 @@ private final class NotificationServiceHandler { switch state { case let .idBased(maxIncomingReadId, _, _, _, _): if maxIncomingReadId >= messageId.id { + Logger.shared.log("NotificationService \(episode)", "maxIncomingReadId: \(maxIncomingReadId), messageId: \(messageId.id), skipping") content = NotificationContent(isLockedMessage: nil) + } else { + Logger.shared.log("NotificationService \(episode)", "maxIncomingReadId: \(maxIncomingReadId), messageId: \(messageId.id), not skipping") } case .indexBased: break