Add missing thread switch

This commit is contained in:
Ali
2021-11-14 12:52:21 +04:00
parent 73ec827353
commit e1e7eace22

View File

@@ -1901,6 +1901,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
private func openChatWhenReady(accountId: AccountRecordId?, peerId: PeerId, messageId: MessageId? = nil, activateInput: Bool = false) {
let signal = self.sharedContextPromise.get()
|> take(1)
|> deliverOnMainQueue
|> mapToSignal { sharedApplicationContext -> Signal<AuthorizedApplicationContext, NoError> in
if let accountId = accountId {
sharedApplicationContext.sharedContext.switchToAccount(id: accountId)