mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Confrence updates
This commit is contained in:
parent
8b0030ca9b
commit
84ad1344c7
@ -126,7 +126,7 @@ private func mappedInsertEntries(context: AccountContext, presentationData: Item
|
|||||||
case let .displayTabInfo(_, text):
|
case let .displayTabInfo(_, text):
|
||||||
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
||||||
case .openNewCall:
|
case .openNewCall:
|
||||||
let item = ItemListPeerActionItem(presentationData: presentationData, style: showSettings ? .blocks : .plain, icon: .none, title: presentationData.strings.CallList_NewCall, hasSeparator: false, sectionId: 1, height: .generic, noInsets: true, editing: false, action: {
|
let item = ItemListPeerActionItem(presentationData: presentationData, style: showSettings ? .blocks : .plain, icon: PresentationResourcesRootController.navigationCallIcon(presentationData.theme), title: presentationData.strings.CallList_NewCall, hasSeparator: false, sectionId: 1, height: .generic, noInsets: true, editing: false, action: {
|
||||||
nodeInteraction.openNewCall()
|
nodeInteraction.openNewCall()
|
||||||
})
|
})
|
||||||
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: item, directionHint: entry.directionHint)
|
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: item, directionHint: entry.directionHint)
|
||||||
@ -150,7 +150,7 @@ private func mappedUpdateEntries(context: AccountContext, presentationData: Item
|
|||||||
case let .displayTabInfo(_, text):
|
case let .displayTabInfo(_, text):
|
||||||
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
||||||
case .openNewCall:
|
case .openNewCall:
|
||||||
let item = ItemListPeerActionItem(presentationData: presentationData, icon: .none, title: presentationData.strings.CallList_NewCall, sectionId: 1, height: .generic, noInsets: true, editing: false, action: {
|
let item = ItemListPeerActionItem(presentationData: presentationData, style: showSettings ? .blocks : .plain, icon: PresentationResourcesRootController.navigationCallIcon(presentationData.theme), title: presentationData.strings.CallList_NewCall, hasSeparator: false, sectionId: 1, height: .generic, noInsets: true, editing: false, action: {
|
||||||
nodeInteraction.openNewCall()
|
nodeInteraction.openNewCall()
|
||||||
})
|
})
|
||||||
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: item, directionHint: entry.directionHint)
|
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: item, directionHint: entry.directionHint)
|
||||||
|
@ -860,6 +860,12 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
self.beginWithVideo = beginWithVideo
|
self.beginWithVideo = beginWithVideo
|
||||||
self.keyPair = keyPair
|
self.keyPair = keyPair
|
||||||
|
|
||||||
|
if self.isConference && conferenceSourceId == nil {
|
||||||
|
self.isMutedValue = .unmuted
|
||||||
|
self.isMutedPromise.set(self.isMutedValue)
|
||||||
|
self.stateValue.muteState = nil
|
||||||
|
}
|
||||||
|
|
||||||
if let keyPair, let initialCall {
|
if let keyPair, let initialCall {
|
||||||
self.e2eContext = ConferenceCallE2EContext(
|
self.e2eContext = ConferenceCallE2EContext(
|
||||||
engine: accountContext.engine,
|
engine: accountContext.engine,
|
||||||
@ -1760,6 +1766,15 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
self.onMutedSpeechActivityDetected?(value)
|
self.onMutedSpeechActivityDetected?(value)
|
||||||
}
|
}
|
||||||
}, isConference: self.isConference, audioIsActiveByDefault: audioIsActiveByDefault, isStream: self.isStream, sharedAudioDevice: self.sharedAudioContext?.audioDevice, encryptionContext: encryptionContext))
|
}, isConference: self.isConference, audioIsActiveByDefault: audioIsActiveByDefault, isStream: self.isStream, sharedAudioDevice: self.sharedAudioContext?.audioDevice, encryptionContext: encryptionContext))
|
||||||
|
|
||||||
|
let isEffectivelyMuted: Bool
|
||||||
|
switch self.isMutedValue {
|
||||||
|
case let .muted(isPushToTalkActive):
|
||||||
|
isEffectivelyMuted = !isPushToTalkActive
|
||||||
|
case .unmuted:
|
||||||
|
isEffectivelyMuted = false
|
||||||
|
}
|
||||||
|
genericCallContext.setIsMuted(isEffectivelyMuted)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.genericCallContext = genericCallContext
|
self.genericCallContext = genericCallContext
|
||||||
@ -1908,13 +1923,21 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
reference = .id(id: callInfo.id, accessHash: callInfo.accessHash)
|
reference = .id(id: callInfo.id, accessHash: callInfo.accessHash)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let isEffectivelyMuted: Bool
|
||||||
|
switch self.isMutedValue {
|
||||||
|
case let .muted(isPushToTalkActive):
|
||||||
|
isEffectivelyMuted = !isPushToTalkActive
|
||||||
|
case .unmuted:
|
||||||
|
isEffectivelyMuted = false
|
||||||
|
}
|
||||||
|
|
||||||
self.currentLocalSsrc = ssrc
|
self.currentLocalSsrc = ssrc
|
||||||
self.requestDisposable.set((self.accountContext.engine.calls.joinGroupCall(
|
self.requestDisposable.set((self.accountContext.engine.calls.joinGroupCall(
|
||||||
peerId: self.peerId,
|
peerId: self.peerId,
|
||||||
joinAs: self.joinAsPeerId,
|
joinAs: self.joinAsPeerId,
|
||||||
callId: callInfo.id,
|
callId: callInfo.id,
|
||||||
reference: reference,
|
reference: reference,
|
||||||
preferMuted: true,
|
preferMuted: isEffectivelyMuted,
|
||||||
joinPayload: joinPayload,
|
joinPayload: joinPayload,
|
||||||
peerAdminIds: peerAdminIds,
|
peerAdminIds: peerAdminIds,
|
||||||
inviteHash: self.invite,
|
inviteHash: self.invite,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user