diff --git a/Linphone/Core/CorePreferences.swift b/Linphone/Core/CorePreferences.swift index 4b4851b23..4ab41d9cb 100644 --- a/Linphone/Core/CorePreferences.swift +++ b/Linphone/Core/CorePreferences.swift @@ -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) diff --git a/Linphone/GeneratedGit.swift b/Linphone/GeneratedGit.swift index 37dc09539..4d7d89c1d 100644 --- a/Linphone/GeneratedGit.swift +++ b/Linphone/GeneratedGit.swift @@ -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" } diff --git a/Linphone/UI/Call/CallView.swift b/Linphone/UI/Call/CallView.swift index 9a155956f..44602f2c4 100644 --- a/Linphone/UI/Call/CallView.swift +++ b/Linphone/UI/Call/CallView.swift @@ -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) } diff --git a/Linphone/UI/Main/Fragments/SideMenu.swift b/Linphone/UI/Main/Fragments/SideMenu.swift index ae3abe5d7..98276346e 100644 --- a/Linphone/UI/Main/Fragments/SideMenu.swift +++ b/Linphone/UI/Main/Fragments/SideMenu.swift @@ -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 + } } }