mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove custom tones menu on macOS (#5776)
* Remove custom tones menu on macos * Moved property to allotted location
This commit is contained in:
+2
@@ -31,6 +31,8 @@ struct NotificationSettingsScreenViewState: BindableState {
|
||||
var applyingChange = false
|
||||
var selectedAlertTone: NotificationTone
|
||||
var availableCustomTones: [NotificationTone]
|
||||
|
||||
let customToneSelectionEnabled: Bool
|
||||
}
|
||||
|
||||
struct NotificationSettingsScreenViewStateBindings {
|
||||
|
||||
+3
-1
@@ -43,7 +43,9 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
|
||||
super.init(initialViewState: NotificationSettingsScreenViewState(bindings: bindings,
|
||||
isModallyPresented: isModallyPresented,
|
||||
selectedAlertTone: appSettings.selectedNotificationTone ?? NotificationToneManager.defaultElementXMessageTone,
|
||||
availableCustomTones: notificationToneManager.customTones()))
|
||||
availableCustomTones: notificationToneManager.customTones(),
|
||||
// macos lacks default sounds and its sandbox Sounds directory is immutable
|
||||
customToneSelectionEnabled: !ProcessInfo.processInfo.isiOSAppOnMac))
|
||||
|
||||
// Listen for changes to AppSettings.
|
||||
appSettings.$enableNotifications
|
||||
|
||||
+3
-1
@@ -39,7 +39,9 @@ struct NotificationSettingsScreen: View {
|
||||
additionalSettingsSection
|
||||
}
|
||||
|
||||
soundSelectionSection
|
||||
if context.viewState.customToneSelectionEnabled {
|
||||
soundSelectionSection
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user