diff --git a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift index 6a5b93cef2..35e91c9cec 100644 --- a/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift +++ b/submodules/TelegramCallsUI/Sources/PresentationGroupCall.swift @@ -823,6 +823,8 @@ public final class PresentationGroupCallImpl: PresentationGroupCall { } deinit { + assert(Queue.mainQueue().isCurrent()) + self.audioSessionShouldBeActiveDisposable?.dispose() self.audioSessionActiveDisposable?.dispose() self.summaryStateDisposable?.dispose() @@ -1074,6 +1076,9 @@ public final class PresentationGroupCallImpl: PresentationGroupCall { activeCallInfo = nil } } + if self.leaving { + shouldJoin = false + } if shouldJoin, let callInfo = activeCallInfo { let callContext: OngoingGroupCallContext