Move any visible account settings into AccountSettings. (#6308)

* Remove the now unused setting to disable in-app notifications.

* Move visible account settings into AccountSettings.

Have ignored enableNotifications for now as that will require reworking the NotificationManager.

* Allow different sounds to be selected for each account.

* Move defaultNotificationTone into AccountSettings.
This commit is contained in:
Doug
2026-10-13 15:21:13 +01:00
committed by GitHub
parent 011087baf5
commit ac29354b08
37 changed files with 240 additions and 151 deletions
@@ -10,7 +10,7 @@ import Foundation
import Testing
/// These tests exercise `NotificationToneManager` against the real app sandbox filesystem.
/// Because all tests share a single `libraryLocation` directory on disk, they are inherently
/// Because all tests share a single `customTonesDirectory` on disk, they are inherently
/// incapable of running in parallel — files written by one test would corrupt the state of
/// another. This project runs test in serial regardless, but this is just to document this is a specific case
/// relying on that behavior.
@@ -56,8 +56,8 @@ struct NotificationToneManagerTests {
@Test
func customTonesFiltersToCAFOnly() throws {
// Given both CAF and non-CAF files written to the library directory
let cafURL = NotificationToneManager.libraryLocation.appending(component: "\(UUID().uuidString).caf")
let mp3URL = NotificationToneManager.libraryLocation.appending(component: "\(UUID().uuidString).mp3")
let cafURL = URL.customTonesDirectory.appending(component: "\(UUID().uuidString).caf")
let mp3URL = URL.customTonesDirectory.appending(component: "\(UUID().uuidString).mp3")
defer {
try? FileManager.default.removeItem(at: cafURL)
try? FileManager.default.removeItem(at: mp3URL)
@@ -79,7 +79,7 @@ struct NotificationToneManagerTests {
func addingDuplicateToneThrowsFileAlreadyExists() async throws {
// Given a CAF file that has already been imported into the library
let sourceURL = URL.temporaryDirectory.appending(component: "\(UUID().uuidString).caf")
let importedURL = NotificationToneManager.libraryLocation
let importedURL = URL.customTonesDirectory
.appending(component: sourceURL.deletingPathExtension().lastPathComponent)
.appendingPathExtension("caf")
defer {