|
@@ -11,7 +11,7 @@ class AppCoordinator: NSObject, Coordinator {
|
|
private let window: UIWindow
|
|
private let window: UIWindow
|
|
private let dcContext: DcContext
|
|
private let dcContext: DcContext
|
|
private let qrTab = 0
|
|
private let qrTab = 0
|
|
- private let chatsTab = 1
|
|
|
|
|
|
+ public let chatsTab = 1
|
|
private let settingsTab = 2
|
|
private let settingsTab = 2
|
|
|
|
|
|
private let appStateRestorer = AppStateRestorer.shared
|
|
private let appStateRestorer = AppStateRestorer.shared
|
|
@@ -225,6 +225,12 @@ class QrViewCoordinator: Coordinator {
|
|
self.navigationController = navigationController
|
|
self.navigationController = navigationController
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ func showChats() {
|
|
|
|
+ if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
|
|
|
|
+ appDelegate.appCoordinator.showTab(index: appDelegate.appCoordinator.chatsTab)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
func showChat(chatId: Int) {
|
|
func showChat(chatId: Int) {
|
|
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
|
|
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
|
|
appDelegate.appCoordinator.showChat(chatId: chatId)
|
|
appDelegate.appCoordinator.showChat(chatId: chatId)
|