Remove custom tones menu on macOS (#5776)

* Remove custom tones menu on macos

* Moved property to allotted location
This commit is contained in:
Michael
2026-06-24 06:24:20 -05:00
committed by GitHub
parent c93d6e3265
commit 80f747985f
3 changed files with 8 additions and 2 deletions
@@ -31,6 +31,8 @@ struct NotificationSettingsScreenViewState: BindableState {
var applyingChange = false
var selectedAlertTone: NotificationTone
var availableCustomTones: [NotificationTone]
let customToneSelectionEnabled: Bool
}
struct NotificationSettingsScreenViewStateBindings {
@@ -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
@@ -39,7 +39,9 @@ struct NotificationSettingsScreen: View {
additionalSettingsSection
}
soundSelectionSection
if context.viewState.customToneSelectionEnabled {
soundSelectionSection
}
}
}
}