diff --git a/NotificationContent/NotificationViewController.swift b/NotificationContent/NotificationViewController.swift index 35aa79011e..60c9bdb835 100644 --- a/NotificationContent/NotificationViewController.swift +++ b/NotificationContent/NotificationViewController.swift @@ -77,7 +77,7 @@ class NotificationViewController: UIViewController, UNNotificationContentExtensi |> take(1) |> introduceError(NotificationContentAuthorizationError.self) |> mapToSignal { accountManager -> Signal<(Account, AccountManager), NotificationContentAuthorizationError> in - return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: telegramAccountAuxiliaryMethods) + return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: telegramAccountAuxiliaryMethods) |> introduceError(NotificationContentAuthorizationError.self) |> mapToSignal { account -> Signal<(Account, AccountManager), NotificationContentAuthorizationError> in if let account = account { diff --git a/Share/ShareRootController.swift b/Share/ShareRootController.swift index f5f643de3e..f2affe971c 100644 --- a/Share/ShareRootController.swift +++ b/Share/ShareRootController.swift @@ -157,7 +157,7 @@ class ShareRootController: UIViewController { Logger.shared.redactSensitiveData = loggingSettings.redactSensitiveData - return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: telegramAccountAuxiliaryMethods) + return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: telegramAccountAuxiliaryMethods) |> introduceError(ShareAuthorizationError.self) |> mapToSignal { account -> Signal<(Account, AccountManager), ShareAuthorizationError> in if let account = account { switch account { diff --git a/SiriIntents/IntentHandler.swift b/SiriIntents/IntentHandler.swift index f3811f9943..da9bf048cf 100644 --- a/SiriIntents/IntentHandler.swift +++ b/SiriIntents/IntentHandler.swift @@ -83,7 +83,7 @@ class IntentHandler: INExtension, INSendMessageIntentHandling, INSearchForMessag account = accountManager(basePath: rootPath + "/accounts-metadata") |> take(1) |> mapToSignal { accountManager -> Signal in - return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: accountAuxiliaryMethods) + return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: accountAuxiliaryMethods) |> mapToSignal { account -> Signal in if let account = account { switch account { diff --git a/Telegram-iOS/AppDelegate.swift b/Telegram-iOS/AppDelegate.swift index 852dddd7da..3fb38e29a7 100644 --- a/Telegram-iOS/AppDelegate.swift +++ b/Telegram-iOS/AppDelegate.swift @@ -354,7 +354,7 @@ private enum QueuedWakeup: Int32 { let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown" - let networkArguments = NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion) + let networkArguments = NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: PresentationCallManager.voipMaxLayer) let appGroupName = "group.\(Bundle.main.bundleIdentifier!)" let maybeAppGroupUrl = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: appGroupName) @@ -1209,7 +1209,7 @@ private enum QueuedWakeup: Int32 { if let callbackUrl = URL(string: secureIdCallbackUrl(with: secureIdData.callbackUrl, peerId: secureIdData.peerId, result: .cancel, parameters: [:])) { UIApplication.shared.openURL(callbackUrl) } - }), TextAlertAction(type: .defaultAction, title: strings.Common_OK, action: {})]), on: .root, blockInteraction: false) + }), TextAlertAction(type: .defaultAction, title: strings.Common_OK, action: {})]), on: .root, blockInteraction: false, completion: {}) } else if let confirmationCode = parseConfirmationCodeUrl(url) { context.rootController.applyConfirmationCode(confirmationCode) } diff --git a/Telegram-iOS/SnapshotEnvironment.swift b/Telegram-iOS/SnapshotEnvironment.swift index b67165e134..339454f806 100644 --- a/Telegram-iOS/SnapshotEnvironment.swift +++ b/Telegram-iOS/SnapshotEnvironment.swift @@ -32,7 +32,7 @@ func snapshotEnvironment(application: UIApplication, mainWindow: UIWindow, statu var result: Account? while true { - let account = currentAccount(allocateIfNotExists: true, networkArguments: NetworkInitializationArguments(apiId: 0, languagesCategory: "ios", appVersion: "unknown"), supplementary: false, manager: accountManagerValue!, rootPath: path, beginWithTestingEnvironment: true, auxiliaryMethods: AccountAuxiliaryMethods(updatePeerChatInputState: { _, _ in return nil }, fetchResource: { _, _, _, _ in + let account = currentAccount(allocateIfNotExists: true, networkArguments: NetworkInitializationArguments(apiId: 0, languagesCategory: "ios", appVersion: "unknown", voipMaxLayer: 0), supplementary: false, manager: accountManagerValue!, rootPath: path, beginWithTestingEnvironment: true, auxiliaryMethods: AccountAuxiliaryMethods(updatePeerChatInputState: { _, _ in return nil }, fetchResource: { _, _, _, _ in return .never() }, fetchResourceMediaReferenceHash: { _ in return .never() diff --git a/Widget/TodayViewController.swift b/Widget/TodayViewController.swift index 4f05d81189..142a645d41 100644 --- a/Widget/TodayViewController.swift +++ b/Widget/TodayViewController.swift @@ -81,26 +81,26 @@ class TodayViewController: UIViewController, NCWidgetProviding { let appVersion = (Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) ?? "unknown" initializeAccountManagement() account = accountManager(basePath: rootPath + "/accounts-metadata") - |> take(1) - |> mapToSignal { accountManager -> Signal in - return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: auxiliaryMethods) - |> mapToSignal { account -> Signal in - if let account = account { - switch account { - case .upgrading: - return .complete() - case let .authorized(account): - accountCache = account - return .single(account) - case .unauthorized: - return .complete() - } - } else { - return .complete() - } + |> take(1) + |> mapToSignal { accountManager -> Signal in + return currentAccount(allocateIfNotExists: false, networkArguments: NetworkInitializationArguments(apiId: apiId, languagesCategory: languagesCategory, appVersion: appVersion, voipMaxLayer: 0), supplementary: true, manager: accountManager, rootPath: rootPath, beginWithTestingEnvironment: false, auxiliaryMethods: auxiliaryMethods) + |> mapToSignal { account -> Signal in + if let account = account { + switch account { + case .upgrading: + return .complete() + case let .authorized(account): + accountCache = account + return .single(account) + case .unauthorized: + return .complete() + } + } else { + return .complete() } } - |> take(1) + } + |> take(1) } let applicationInterface = account |> afterNext { account in diff --git a/submodules/Display b/submodules/Display index 33eb6fae00..7b089c0659 160000 --- a/submodules/Display +++ b/submodules/Display @@ -1 +1 @@ -Subproject commit 33eb6fae00f6b3413013bff612c2bad7d7e90330 +Subproject commit 7b089c0659313b52cf873ccbc59197cc1f85bad6 diff --git a/submodules/LegacyComponents b/submodules/LegacyComponents index 0753d31062..2588e3ef9e 160000 --- a/submodules/LegacyComponents +++ b/submodules/LegacyComponents @@ -1 +1 @@ -Subproject commit 0753d3106214151d27910256e19b133bdac077b0 +Subproject commit 2588e3ef9e4ea146ce6ea2bf0321633fc75db606 diff --git a/submodules/Postbox b/submodules/Postbox index 654798e5fd..d6858d186e 160000 --- a/submodules/Postbox +++ b/submodules/Postbox @@ -1 +1 @@ -Subproject commit 654798e5fd01f96b69ccf5b3c52f0aa86bdb722d +Subproject commit d6858d186ecef1521cd2c6c3a1cfa7c7d8b19721 diff --git a/submodules/TelegramCore b/submodules/TelegramCore index 1927b4bdcb..3e50d8ac95 160000 --- a/submodules/TelegramCore +++ b/submodules/TelegramCore @@ -1 +1 @@ -Subproject commit 1927b4bdcb9bc681cc4016f3af0856fbac155240 +Subproject commit 3e50d8ac950ed5c39ba4b661cf579239c2305821 diff --git a/submodules/TelegramUI b/submodules/TelegramUI index 054688879a..cc12a925bb 160000 --- a/submodules/TelegramUI +++ b/submodules/TelegramUI @@ -1 +1 @@ -Subproject commit 054688879a3c59b4d26202a6ad9359a020ed6d1d +Subproject commit cc12a925bb2953327b7219f8d3e68f23735b437f