From 196b1cf7b79c40f16e2c6d2c245df4934f1f3d2f Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 20 Oct 2022 15:57:31 +0400 Subject: [PATCH] Fix forum hole reset --- .../Sources/State/AccountStateManagementUtils.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift index 426aae9e2a..59ddb2ff52 100644 --- a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift +++ b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift @@ -2414,6 +2414,8 @@ private func resetChannels(postbox: Postbox, network: Network, peers: [Peer], st notificationSettings[peerId] = TelegramPeerNotificationSettings(apiSettings: apiNotificationSettings) updatedState.updatePeerChatInclusion(peerId: peerId, groupId: groupId, changedGroup: false) + + updatedState.resetForumTopicLists[peerId] = [] } for message in messages { @@ -2490,7 +2492,11 @@ private func resetChannels(postbox: Postbox, network: Network, peers: [Peer], st private func pollChannel(postbox: Postbox, network: Network, peer: Peer, state: AccountMutableState) -> Signal<(AccountMutableState, Bool, Int32?), NoError> { if let inputChannel = apiInputChannel(peer) { let limit: Int32 + #if DEBUG + limit = 2 + #else limit = 100 + #endif let pollPts: Int32 if let channelState = state.channelStates[peer.id] {