mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Screen sharing in 1-to-1 calls
This commit is contained in:
@@ -870,21 +870,21 @@ final class AuthorizedApplicationContext {
|
||||
func switchAccount() {
|
||||
let _ = (activeAccountsAndPeers(context: self.context)
|
||||
|> take(1)
|
||||
|> map { primaryAndAccounts -> (Account, Peer, Int32)? in
|
||||
|> map { primaryAndAccounts -> (AccountContext, Peer, Int32)? in
|
||||
return primaryAndAccounts.1.first
|
||||
}
|
||||
|> map { accountAndPeer -> Account? in
|
||||
if let (account, _, _) = accountAndPeer {
|
||||
return account
|
||||
|> map { accountAndPeer -> AccountContext? in
|
||||
if let (context, _, _) = accountAndPeer {
|
||||
return context
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|> deliverOnMainQueue).start(next: { [weak self] account in
|
||||
guard let strongSelf = self, let account = account else {
|
||||
|> deliverOnMainQueue).start(next: { [weak self] context in
|
||||
guard let strongSelf = self, let context = context else {
|
||||
return
|
||||
}
|
||||
strongSelf.context.sharedContext.switchToAccount(id: account.id, fromSettingsController: nil, withChatListController: nil)
|
||||
strongSelf.context.sharedContext.switchToAccount(id: context.account.id, fromSettingsController: nil, withChatListController: nil)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user