mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Refactoring
This commit is contained in:
@@ -438,14 +438,14 @@ final class AuthorizationSequencePhoneEntryControllerNode: ASDisplayNode {
|
||||
|> castError(ExportAuthTransferTokenError.self)
|
||||
|> take(1)
|
||||
|> mapToSignal { activeAccountsAndInfo -> Signal<ExportAuthTransferTokenResult, ExportAuthTransferTokenError> in
|
||||
let (primary, activeAccounts, _) = activeAccountsAndInfo
|
||||
var activeProductionUserIds = activeAccounts.map({ $0.1 }).filter({ !$0.testingEnvironment }).map({ $0.peerId.id })
|
||||
var activeTestingUserIds = activeAccounts.map({ $0.1 }).filter({ $0.testingEnvironment }).map({ $0.peerId.id })
|
||||
let (_, activeAccounts, _) = activeAccountsAndInfo
|
||||
let activeProductionUserIds = activeAccounts.map({ $0.1 }).filter({ !$0.testingEnvironment }).map({ $0.peerId.id })
|
||||
let activeTestingUserIds = activeAccounts.map({ $0.1 }).filter({ $0.testingEnvironment }).map({ $0.peerId.id })
|
||||
|
||||
let allProductionUserIds = activeProductionUserIds
|
||||
let allTestingUserIds = activeTestingUserIds
|
||||
|
||||
return exportAuthTransferToken(accountManager: sharedContext.accountManager, account: account, otherAccountUserIds: account.testingEnvironment ? allTestingUserIds : allProductionUserIds, syncContacts: true)
|
||||
return TelegramEngineUnauthorized(account: account).auth.exportAuthTransferToken(accountManager: sharedContext.accountManager, otherAccountUserIds: account.testingEnvironment ? allTestingUserIds : allProductionUserIds, syncContacts: true)
|
||||
}
|
||||
|
||||
self.exportTokenDisposable.set((tokenSignal
|
||||
|
||||
Reference in New Issue
Block a user