mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Voice Chat Fixes
This commit is contained in:
@@ -558,6 +558,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
|
||||
public private(set) var schedulePending = false
|
||||
private var isScheduled = false
|
||||
private var isScheduledStarted = false
|
||||
|
||||
init(
|
||||
accountContext: AccountContext,
|
||||
@@ -1822,11 +1823,10 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
strongSelf.stateValue.recordingStartTimestamp = state.recordingStartTimestamp
|
||||
strongSelf.stateValue.title = state.title
|
||||
|
||||
if state.scheduleTimestamp == nil {
|
||||
strongSelf.stateValue.scheduleTimestamp = strongSelf.isScheduledStarted ? nil : state.scheduleTimestamp
|
||||
if state.scheduleTimestamp == nil && !strongSelf.isScheduledStarted {
|
||||
strongSelf.updateSessionState(internalState: .active(GroupCallInfo(id: callInfo.id, accessHash: callInfo.accessHash, participantCount: state.totalCount, clientParams: callInfo.clientParams, streamDcId: callInfo.streamDcId, title: state.title, scheduleTimestamp: nil, subscribedToScheduled: false, recordingStartTimestamp: nil, sortAscending: true)), audioSessionControl: strongSelf.audioSessionControl)
|
||||
} else {
|
||||
strongSelf.stateValue.scheduleTimestamp = state.scheduleTimestamp
|
||||
|
||||
strongSelf.summaryInfoState.set(.single(SummaryInfoState(info: GroupCallInfo(
|
||||
id: callInfo.id,
|
||||
accessHash: callInfo.accessHash,
|
||||
@@ -2170,11 +2170,13 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
public func startScheduled() {
|
||||
guard case let .active(callInfo) = self.internalState else {
|
||||
return
|
||||
}
|
||||
|
||||
self.isScheduledStarted = true
|
||||
self.stateValue.scheduleTimestamp = nil
|
||||
|
||||
self.startDisposable.set((startScheduledGroupCall(account: self.account, peerId: self.peerId, callId: callInfo.id, accessHash: callInfo.accessHash)
|
||||
|
||||
@@ -2378,7 +2378,7 @@ public final class VoiceChatController: ViewController {
|
||||
pickerView.isUserInteractionEnabled = false
|
||||
}
|
||||
|
||||
self.timerNode.alpha = 1.0
|
||||
self.timerNode.isHidden = false
|
||||
self.timerNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.25)
|
||||
self.timerNode.animateIn()
|
||||
|
||||
@@ -2638,7 +2638,6 @@ public final class VoiceChatController: ViewController {
|
||||
self.schedule()
|
||||
} else if callState.canManageCall {
|
||||
self.call.startScheduled()
|
||||
self.transitionToCall()
|
||||
} else {
|
||||
self.call.toggleScheduledSubscription(!callState.subscribedToScheduled)
|
||||
}
|
||||
@@ -3443,7 +3442,7 @@ public final class VoiceChatController: ViewController {
|
||||
self.listNode.isUserInteractionEnabled = false
|
||||
self.backgroundNode.backgroundColor = panelBackgroundColor
|
||||
self.updateIsFullscreen(false)
|
||||
} else if self.callState?.scheduleTimestamp == nil && self.listNode.alpha == 0.0 {
|
||||
} else if self.callState?.scheduleTimestamp == nil && !self.isScheduling && self.listNode.alpha == 0.0 {
|
||||
self.transitionToCall()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user