mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
Disable video calls when core.videoEnabled is false
This commit is contained in:
parent
4feae7fccd
commit
4c45a9bb1e
7 changed files with 121 additions and 100 deletions
|
|
@ -2,6 +2,6 @@ import Foundation
|
|||
|
||||
public enum AppGitInfo {
|
||||
public static let branch = "master"
|
||||
public static let commit = "1501dae01"
|
||||
public static let commit = "4feae7fcc"
|
||||
public static let tag = "6.1.0-alpha"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1956,6 +1956,7 @@ struct CallView: View {
|
|||
|
||||
Spacer()
|
||||
|
||||
if !SharedMainViewModel.shared.disableVideoCall {
|
||||
ZStack {
|
||||
Button {
|
||||
if optionsChangeLayout == 3 {
|
||||
|
|
@ -1986,6 +1987,7 @@ struct CallView: View {
|
|||
}
|
||||
}
|
||||
.frame(width: buttonSize, height: buttonSize)
|
||||
}
|
||||
|
||||
Button {
|
||||
callViewModel.toggleMuteMicrophone()
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ struct MeetingWaitingRoomFragment: View {
|
|||
HStack {
|
||||
Spacer()
|
||||
|
||||
if !SharedMainViewModel.shared.disableVideoCall {
|
||||
Button {
|
||||
!meetingWaitingRoomViewModel.videoDisplayed
|
||||
? meetingWaitingRoomViewModel.enableVideoPreview() : meetingWaitingRoomViewModel.disableVideoPreview()
|
||||
|
|
@ -283,6 +284,7 @@ struct MeetingWaitingRoomFragment: View {
|
|||
.background(Color.gray500)
|
||||
.cornerRadius(40)
|
||||
.padding(.horizontal, 5)
|
||||
}
|
||||
|
||||
Button {
|
||||
meetingWaitingRoomViewModel.toggleMuteMicrophone()
|
||||
|
|
|
|||
|
|
@ -225,6 +225,7 @@ struct ContactInnerFragment: View {
|
|||
|
||||
Spacer()
|
||||
|
||||
if !SharedMainViewModel.shared.disableVideoCall {
|
||||
Button(action: {
|
||||
CoreContext.shared.doOnCoreQueue { core in
|
||||
if contactAvatarModel.addresses.count == 1 {
|
||||
|
|
@ -265,6 +266,7 @@ struct ContactInnerFragment: View {
|
|||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.padding(.top, 20)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(Color.gray100)
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ struct HistoryContactFragment: View {
|
|||
})
|
||||
}
|
||||
|
||||
if !SharedMainViewModel.shared.disableVideoCall {
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
|
|
@ -306,6 +307,7 @@ struct HistoryContactFragment: View {
|
|||
.frame(minWidth: 80)
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
Button(action: {
|
||||
withAnimation {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class SharedMainViewModel: ObservableObject {
|
|||
@Published var missedCallsCount: Int = 0
|
||||
@Published var cardDavFriendsListsCount: Int = 0
|
||||
|
||||
@Published var disableVideoCall: Bool = false
|
||||
@Published var disableChatFeature: Bool = false
|
||||
@Published var disableMeetingFeature: Bool = false
|
||||
|
||||
|
|
@ -95,8 +96,9 @@ class SharedMainViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
updateMissedCallsCount()
|
||||
updateUnreadMessagesCount()
|
||||
updateDisableVideoCall()
|
||||
updateDisableChatFeature()
|
||||
updateUnreadMessagesCount()
|
||||
updateDisableMeetingFeature()
|
||||
|
||||
getCardDavFriendsListsCount()
|
||||
|
|
@ -225,6 +227,16 @@ class SharedMainViewModel: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
func updateDisableVideoCall() {
|
||||
CoreContext.shared.doOnCoreQueue { core in
|
||||
let disableVideoCallFeatureTmp = !core.videoEnabled
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.disableVideoCall = disableVideoCallFeatureTmp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func updateDisableChatFeature() {
|
||||
CoreContext.shared.doOnCoreQueue { core in
|
||||
let disableChatFeatureTmp = CorePreferences.disableChatFeature
|
||||
|
|
@ -246,6 +258,7 @@ class SharedMainViewModel: ObservableObject {
|
|||
}
|
||||
|
||||
func updateConfigChanges() {
|
||||
updateDisableVideoCall()
|
||||
updateDisableChatFeature()
|
||||
updateDisableMeetingFeature()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
"location" : "https://gitlab.linphone.org/BC/public/linphone-sdk-swift-ios.git",
|
||||
"state" : {
|
||||
"branch" : "alpha",
|
||||
"revision" : "1e266452f9e464d8d6ea8359722d9038c5f46b9d"
|
||||
"revision" : "e82eb03f276a3c6f4b9b4d87ca7faff5f5d42b8a"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue