From 1cee5a52814bd8db9ca19ce009b7bc0ccd564ad2 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Fri, 19 Mar 2021 18:06:36 +0400 Subject: [PATCH] Attempt to fix the forwarding panel --- submodules/TelegramUI/Sources/ChatController.swift | 8 +++++++- .../TelegramUI/Sources/ForwardAccessoryPanelNode.swift | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index f39b397e6a..b29eed1632 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -4322,7 +4322,13 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G //effectiveCachedDataReady = .single(true) effectiveCachedDataReady = self.cachedDataReady.get() } - self.ready.set(combineLatest(self.chatDisplayNode.historyNode.historyState.get(), self._chatLocationInfoReady.get(), effectiveCachedDataReady, initialData) |> map { _, chatLocationInfoReady, cachedDataReady, _ in + self.ready.set(combineLatest(queue: .mainQueue(), + self.chatDisplayNode.historyNode.historyState.get(), + self._chatLocationInfoReady.get(), + effectiveCachedDataReady, + initialData + ) + |> map { _, chatLocationInfoReady, cachedDataReady, _ in return chatLocationInfoReady && cachedDataReady }) diff --git a/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift b/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift index 2cfeccc1d3..28f2e0f4da 100644 --- a/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift +++ b/submodules/TelegramUI/Sources/ForwardAccessoryPanelNode.swift @@ -100,7 +100,7 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode { self.closeButton.displaysAsynchronously = false self.lineNode = ASImageNode() - self.lineNode.displayWithoutProcessing = true + self.lineNode.displayWithoutProcessing = false self.lineNode.displaysAsynchronously = false self.lineNode.image = PresentationResourcesChat.chatInputPanelVerticalSeparatorLineImage(theme) @@ -158,6 +158,11 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode { strongSelf.actionArea.accessibilityLabel = "\(headerString). From: \(authors).\n\(text)" strongSelf.setNeedsLayout() + if let subnodes = strongSelf.subnodes { + for subnode in subnodes { + subnode.setNeedsDisplay() + } + } } })) } @@ -198,7 +203,6 @@ final class ForwardAccessoryPanelNode: AccessoryPanelNode { } override func updateState(size: CGSize, interfaceState: ChatPresentationInterfaceState) { - } override func layout() {