Various fixes

This commit is contained in:
Ilya Laktyushin
2020-12-19 03:16:15 +04:00
parent c4cd3c318a
commit f91cc7f744
22 changed files with 93 additions and 29 deletions

View File

@@ -1799,8 +1799,20 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
}
@objc private func composePressed() {
let controller = self.context.sharedContext.makeComposeController(context: self.context)
(self.navigationController as? NavigationController)?.pushViewController(controller)
guard let navigationController = self.navigationController as? NavigationController else {
return
}
var hasComposeController = false
navigationController.viewControllers.forEach { controller in
if controller is ComposeController {
hasComposeController = true
}
}
if !hasComposeController {
let controller = self.context.sharedContext.makeComposeController(context: self.context)
navigationController.pushViewController(controller)
}
}
public override var keyShortcuts: [KeyShortcut] {