mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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 applyingChange = false
|
||||||
var selectedAlertTone: NotificationTone
|
var selectedAlertTone: NotificationTone
|
||||||
var availableCustomTones: [NotificationTone]
|
var availableCustomTones: [NotificationTone]
|
||||||
|
|
||||||
|
let customToneSelectionEnabled: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NotificationSettingsScreenViewStateBindings {
|
struct NotificationSettingsScreenViewStateBindings {
|
||||||
|
|||||||
+3
-1
@@ -43,7 +43,9 @@ class NotificationSettingsScreenViewModel: NotificationSettingsScreenViewModelTy
|
|||||||
super.init(initialViewState: NotificationSettingsScreenViewState(bindings: bindings,
|
super.init(initialViewState: NotificationSettingsScreenViewState(bindings: bindings,
|
||||||
isModallyPresented: isModallyPresented,
|
isModallyPresented: isModallyPresented,
|
||||||
selectedAlertTone: appSettings.selectedNotificationTone ?? NotificationToneManager.defaultElementXMessageTone,
|
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.
|
// Listen for changes to AppSettings.
|
||||||
appSettings.$enableNotifications
|
appSettings.$enableNotifications
|
||||||
|
|||||||
+3
-1
@@ -39,7 +39,9 @@ struct NotificationSettingsScreen: View {
|
|||||||
additionalSettingsSection
|
additionalSettingsSection
|
||||||
}
|
}
|
||||||
|
|
||||||
soundSelectionSection
|
if context.viewState.customToneSelectionEnabled {
|
||||||
|
soundSelectionSection
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user