Refactoring

This commit is contained in:
Ali
2021-04-18 03:31:01 +04:00
parent 60d959bff8
commit df4b313808
37 changed files with 64 additions and 57 deletions

View File

@@ -465,7 +465,7 @@ final class AuthorizedApplicationContext {
|> deliverOnMainQueue).start(completed: {
controller?.dismiss()
if let strongSelf = self, let botName = botName {
strongSelf.termsOfServiceProceedToBotDisposable.set((resolvePeerByName(account: strongSelf.context.account, name: botName, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peerId in
strongSelf.termsOfServiceProceedToBotDisposable.set((strongSelf.context.engine.peers.resolvePeerByName(name: botName, ageLimit: 10) |> take(1) |> deliverOnMainQueue).start(next: { peerId in
if let strongSelf = self, let peerId = peerId {
self?.rootController.pushViewController(ChatControllerImpl(context: strongSelf.context, chatLocation: .peer(peerId)))
}