From 7e95351389ae3a62b513073ccf7c61f664cc7c6e Mon Sep 17 00:00:00 2001 From: Pavel Gurov Date: Sun, 23 Jun 2019 19:44:56 +0300 Subject: [PATCH] Remove animations when switching chats in ipad --- TelegramUI/ChatListController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TelegramUI/ChatListController.swift b/TelegramUI/ChatListController.swift index 2b09e5c3..495fe4b6 100644 --- a/TelegramUI/ChatListController.swift +++ b/TelegramUI/ChatListController.swift @@ -682,7 +682,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie if let layout = strongSelf.validLayout, case .regular = layout.metrics.widthClass { scrollToEndIfExists = true } - navigateToChatController(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peerId), scrollToEndIfExists: scrollToEndIfExists, animated: animated, completion: { [weak self] in + navigateToChatController(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peerId), scrollToEndIfExists: scrollToEndIfExists, animated: UIDevice.current.userInterfaceIdiom == .pad ? false : animated, completion: { [weak self] in self?.chatListDisplayNode.chatListNode.clearHighlightAnimated(true) }) } @@ -693,7 +693,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie if let strongSelf = self { if let navigationController = strongSelf.navigationController as? NavigationController { let chatListController = ChatListController(context: strongSelf.context, groupId: groupId, controlsHistoryPreload: false) - navigationController.pushViewController(chatListController) + navigationController.pushViewController(chatListController, animated: UIDevice.current.userInterfaceIdiom == .pad ? false : true) strongSelf.chatListDisplayNode.chatListNode.clearHighlightAnimated(true) } }