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):
|
||||
return ListViewInsertItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
||||
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()
|
||||
})
|
||||
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):
|
||||
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: ItemListTextItem(presentationData: presentationData, text: .plain(text), sectionId: 0), directionHint: entry.directionHint)
|
||||
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()
|
||||
})
|
||||
return ListViewUpdateItem(index: entry.index, previousIndex: entry.previousIndex, item: item, directionHint: entry.directionHint)
|
||||
|
@ -859,6 +859,12 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
self.isConference = isConference
|
||||
self.beginWithVideo = beginWithVideo
|
||||
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 {
|
||||
self.e2eContext = ConferenceCallE2EContext(
|
||||
@ -1760,6 +1766,15 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
self.onMutedSpeechActivityDetected?(value)
|
||||
}
|
||||
}, 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
|
||||
@ -1907,6 +1922,14 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
} else {
|
||||
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.requestDisposable.set((self.accountContext.engine.calls.joinGroupCall(
|
||||
@ -1914,7 +1937,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
||||
joinAs: self.joinAsPeerId,
|
||||
callId: callInfo.id,
|
||||
reference: reference,
|
||||
preferMuted: true,
|
||||
preferMuted: isEffectivelyMuted,
|
||||
joinPayload: joinPayload,
|
||||
peerAdminIds: peerAdminIds,
|
||||
inviteHash: self.invite,
|
||||
|
Loading…
x
Reference in New Issue
Block a user