mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Voice Chat fixes
This commit is contained in:
@@ -133,9 +133,16 @@ public final class SharedWakeupManager {
|
||||
return call?.account.id == account.id
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
let isPlayingBackgroundActiveCall = combineLatest(queue: .mainQueue(), hasActiveCalls, hasActiveAudioSession)
|
||||
|> map { hasActiveCalls, hasActiveAudioSession -> Bool in
|
||||
return hasActiveCalls && hasActiveAudioSession
|
||||
|
||||
let hasActiveGroupCalls = (callManager?.currentGroupCallSignal ?? .single(nil))
|
||||
|> map { call in
|
||||
return call?.accountContext.account.id == account.id
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
|
||||
let isPlayingBackgroundActiveCall = combineLatest(queue: .mainQueue(), hasActiveCalls, hasActiveGroupCalls, hasActiveAudioSession)
|
||||
|> map { hasActiveCalls, hasActiveGroupCalls, hasActiveAudioSession -> Bool in
|
||||
return (hasActiveCalls || hasActiveGroupCalls) && hasActiveAudioSession
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
|
||||
|
||||
Reference in New Issue
Block a user