Another feed experiment

This commit is contained in:
Ali
2022-03-18 22:55:06 +04:00
parent fe0311b1e9
commit a9c595a640
128 changed files with 3524 additions and 957 deletions

View File

@@ -163,7 +163,7 @@ public class ComposeControllerImpl: ViewController, ComposeController {
strongSelf.createActionDisposable.set((strongSelf.context.engine.peers.createSecretChat(peerId: peer.id) |> deliverOnMainQueue).start(next: { peerId in
if let strongSelf = self, let controller = controller {
controller.displayNavigationActivity = false
(controller.navigationController as? NavigationController)?.replaceAllButRootController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(peerId)), animated: true)
(controller.navigationController as? NavigationController)?.replaceAllButRootController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(id: peerId)), animated: true)
}
}, error: { error in
if let strongSelf = self, let controller = controller {
@@ -207,7 +207,7 @@ public class ComposeControllerImpl: ViewController, ComposeController {
if let peer = peer {
DispatchQueue.main.async {
if let navigationController = strongSelf.navigationController as? NavigationController {
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(peer.id)))
strongSelf.context.sharedContext.navigateToChatController(NavigateToChatControllerParams(navigationController: navigationController, context: strongSelf.context, chatLocation: .peer(id: peer.id)))
}
}
} else {
@@ -305,7 +305,7 @@ public class ComposeControllerImpl: ViewController, ComposeController {
}
private func openPeer(peerId: PeerId) {
(self.navigationController as? NavigationController)?.replaceTopController(ChatControllerImpl(context: self.context, chatLocation: .peer(peerId)), animated: true)
(self.navigationController as? NavigationController)?.replaceTopController(ChatControllerImpl(context: self.context, chatLocation: .peer(id: peerId)), animated: true)
}
@objc private func cancelPressed() {