From 117a1f6c226bbc5a337c42d9f3d72286a890cdcf Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Wed, 9 Nov 2022 18:54:43 +0400 Subject: [PATCH] Fix chatlist toolbar setup --- submodules/ChatListUI/Sources/ChatListController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/ChatListUI/Sources/ChatListController.swift b/submodules/ChatListUI/Sources/ChatListController.swift index aa279917e2..866de607c7 100644 --- a/submodules/ChatListUI/Sources/ChatListController.swift +++ b/submodules/ChatListUI/Sources/ChatListController.swift @@ -1835,7 +1835,7 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController } else if let peerView = peerView, let channel = peerView.peers[peerView.peerId] as? TelegramChannel { switch channel.participationStatus { case .member: - strongSelf.setToolbar(nil, transition: .animated(duration: 0.4, curve: .spring)) + toolbar = nil default: let actionTitle: String if channel.flags.contains(.requestToJoin) { @@ -1843,13 +1843,13 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController } else { actionTitle = strongSelf.presentationData.strings.Channel_JoinChannel } - strongSelf.setToolbar(Toolbar(leftAction: nil, rightAction: nil, middleAction: ToolbarAction(title: actionTitle, isEnabled: true)), transition: .animated(duration: 0.4, curve: .spring)) + toolbar = Toolbar(leftAction: nil, rightAction: nil, middleAction: ToolbarAction(title: actionTitle, isEnabled: true)) } } var transition: ContainedViewLayoutTransition = .immediate let previousToolbar = previousToolbarValue.swap(toolbar) if (previousToolbar == nil) != (toolbar == nil) { - transition = .animated(duration: 0.3, curve: .easeInOut) + transition = .animated(duration: 0.4, curve: .spring) } strongSelf.setToolbar(toolbar, transition: transition) }))