mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix forum forwarding
This commit is contained in:
parent
6ed54e991b
commit
45952b7c18
2 changed files with 18 additions and 0 deletions
|
|
@ -228,6 +228,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
|||
replaceImpl = { [weak controller] c in
|
||||
controller?.replace(with: c)
|
||||
}
|
||||
strongSelf.peerSelectionNode.pushedController = controller
|
||||
strongSelf.push(controller)
|
||||
} else {
|
||||
strongSelf.selectTab(id: id)
|
||||
|
|
@ -330,6 +331,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
|||
)
|
||||
)
|
||||
controller.peerSelected = self.peerSelected
|
||||
self.peerSelectionNode.pushedController = controller
|
||||
self.push(controller)
|
||||
} else {
|
||||
peerSelected(.channel(peer), threadId)
|
||||
|
|
@ -373,6 +375,7 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
|||
)
|
||||
)
|
||||
controller.peerSelected = strongSelf.peerSelected
|
||||
strongSelf.peerSelectionNode.pushedController = controller
|
||||
strongSelf.push(controller)
|
||||
} else {
|
||||
peerSelected(peer, threadId)
|
||||
|
|
@ -626,4 +629,16 @@ public final class PeerSelectionControllerImpl: ViewController, PeerSelectionCon
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
override public func dismiss(completion: (() -> Void)? = nil) {
|
||||
guard let navigationController = self.navigationController as? NavigationController else {
|
||||
return
|
||||
}
|
||||
var viewControllers = navigationController.viewControllers
|
||||
viewControllers.removeAll(where: { $0 === self })
|
||||
if let pushedController = self.peerSelectionNode.pushedController {
|
||||
viewControllers.removeAll(where: { $0 === pushedController })
|
||||
}
|
||||
navigationController.setViewControllers(viewControllers, animated: true)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ final class PeerSelectionControllerNode: ASDisplayNode {
|
|||
|
||||
private var countPanelNode: PeersCountPanelNode?
|
||||
|
||||
weak var pushedController: ViewController?
|
||||
|
||||
private var readyValue = Promise<Bool>()
|
||||
var ready: Signal<Bool, NoError> {
|
||||
return self.readyValue.get()
|
||||
|
|
@ -348,6 +350,7 @@ final class PeerSelectionControllerNode: ASDisplayNode {
|
|||
replaceImpl = { [weak controller] c in
|
||||
controller?.replace(with: c)
|
||||
}
|
||||
strongSelf.pushedController = controller
|
||||
strongSelf.controller?.push(controller)
|
||||
}
|
||||
self.addSubnode(mainContainerNode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue