mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Add disableCallRecordings to CorePreferences
This commit is contained in:
parent
e3bf00dca5
commit
3eb09bf8b0
4 changed files with 24 additions and 12 deletions
|
|
@ -159,6 +159,15 @@ class CorePreferences {
|
|||
}
|
||||
}
|
||||
|
||||
var disableCallRecordings: Bool {
|
||||
get {
|
||||
config.getBool(section: "ui", key: "disable_call_recordings_feature", defaultValue: false)
|
||||
}
|
||||
set {
|
||||
config.setBool(section: "ui", key: "disable_call_recordings_feature", value: newValue)
|
||||
}
|
||||
}
|
||||
|
||||
var disableChatFeature: Bool {
|
||||
get {
|
||||
config.getBool(section: "ui", key: "disable_chat_feature", defaultValue: false)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ import Foundation
|
|||
|
||||
public enum AppGitInfo {
|
||||
public static let branch = "master"
|
||||
public static let commit = "b3ed027c6"
|
||||
public static let commit = "efed662a3"
|
||||
public static let tag = "6.1.0-alpha"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2373,7 +2373,7 @@ struct CallView: View {
|
|||
.frame(width: buttonSize, height: buttonSize)
|
||||
.background(callViewModel.isRecording ? Color.redDanger500 : Color.gray500)
|
||||
.cornerRadius(40)
|
||||
.disabled(callViewModel.isPaused || telecomManager.isPausedByRemote)
|
||||
.disabled(AppServices.corePreferences.disableCallRecordings || callViewModel.isPaused || telecomManager.isPausedByRemote)
|
||||
|
||||
Text("call_action_record_call")
|
||||
.foregroundStyle(.white)
|
||||
|
|
@ -2381,7 +2381,7 @@ struct CallView: View {
|
|||
}
|
||||
.frame(width: geo.size.width * 0.24, height: geo.size.width * 0.24)
|
||||
|
||||
if telecomManager.isPausedByRemote {
|
||||
if AppServices.corePreferences.disableCallRecordings || callViewModel.isPaused || telecomManager.isPausedByRemote {
|
||||
Color.gray600.opacity(0.8)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
|
|
@ -2799,7 +2799,7 @@ struct CallView: View {
|
|||
.frame(width: buttonSize, height: buttonSize)
|
||||
.background(callViewModel.isRecording ? Color.redDanger500 : Color.gray500)
|
||||
.cornerRadius(40)
|
||||
.disabled(callViewModel.isPaused || telecomManager.isPausedByRemote)
|
||||
.disabled(AppServices.corePreferences.disableCallRecordings || callViewModel.isPaused || telecomManager.isPausedByRemote)
|
||||
|
||||
Text("call_action_record_call")
|
||||
.foregroundStyle(.white)
|
||||
|
|
@ -2807,7 +2807,7 @@ struct CallView: View {
|
|||
}
|
||||
.frame(width: geo.size.width * 0.125, height: geo.size.width * 0.125)
|
||||
|
||||
if callViewModel.isPaused || telecomManager.isPausedByRemote {
|
||||
if AppServices.corePreferences.disableCallRecordings || callViewModel.isPaused || telecomManager.isPausedByRemote {
|
||||
Color.gray600.opacity(0.8)
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,13 +138,16 @@ struct SideMenu: View {
|
|||
}
|
||||
}
|
||||
|
||||
SideMenuEntry(
|
||||
iconName: "record-fill",
|
||||
title: "recordings_title"
|
||||
).onTapGesture {
|
||||
self.menuClose()
|
||||
withAnimation {
|
||||
isShowRecordingsListFragment = true
|
||||
|
||||
if !AppServices.corePreferences.disableCallRecordings {
|
||||
SideMenuEntry(
|
||||
iconName: "record-fill",
|
||||
title: "recordings_title"
|
||||
).onTapGesture {
|
||||
self.menuClose()
|
||||
withAnimation {
|
||||
isShowRecordingsListFragment = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue