mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fixed Apple Pay
Added ability to download music without streaming Added progress indicators for various blocking tasks Fixed image gallery swipe to dismiss after zooming Added online member count indication in supergroups Fixed contact statuses in contact search
This commit is contained in:
@@ -9,7 +9,7 @@ public enum NavigateToChatKeepStack {
|
||||
case never
|
||||
}
|
||||
|
||||
public func navigateToChatController(navigationController: NavigationController, chatController: ChatController? = nil, account: Account, chatLocation: ChatLocation, messageId: MessageId? = nil, botStart: ChatControllerInitialBotStart? = nil, keepStack: NavigateToChatKeepStack = .default, purposefulAction: (()-> Void)? = nil, animated: Bool = true) {
|
||||
public func navigateToChatController(navigationController: NavigationController, chatController: ChatController? = nil, account: Account, chatLocation: ChatLocation, messageId: MessageId? = nil, botStart: ChatControllerInitialBotStart? = nil, keepStack: NavigateToChatKeepStack = .default, purposefulAction: (() -> Void)? = nil, animated: Bool = true, completion: @escaping () -> Void = {}) {
|
||||
var found = false
|
||||
var isFirst = true
|
||||
for controller in navigationController.viewControllers.reversed() {
|
||||
@@ -24,6 +24,7 @@ public func navigateToChatController(navigationController: NavigationController,
|
||||
} else {
|
||||
let _ = navigationController.popToViewController(controller, animated: animated)
|
||||
}
|
||||
completion()
|
||||
found = true
|
||||
break
|
||||
}
|
||||
@@ -48,9 +49,9 @@ public func navigateToChatController(navigationController: NavigationController,
|
||||
resolvedKeepStack = false
|
||||
}
|
||||
if resolvedKeepStack {
|
||||
navigationController.pushViewController(controller)
|
||||
navigationController.pushViewController(controller, completion: completion)
|
||||
} else {
|
||||
navigationController.replaceAllButRootController(controller, animated: animated)
|
||||
navigationController.replaceAllButRootController(controller, animated: animated, completion: completion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user