Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2022-01-05 00:52:14 +03:00
53 changed files with 1132 additions and 646 deletions

View File

@@ -827,7 +827,13 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
|> mapToSignal { context -> Signal<AccountRecordId?, NoError> in
if let context = context, let liveLocationManager = context.context.liveLocationManager {
let accountId = context.context.account.id
return liveLocationManager.isPolling
return combineLatest(queue: .mainQueue(),
liveLocationManager.isPolling,
liveLocationManager.hasBackgroundTasks
)
|> map { isPolling, hasBackgroundTasks -> Bool in
return isPolling || hasBackgroundTasks
}
|> distinctUntilChanged
|> map { value -> AccountRecordId? in
if value {