@@ -26,7 +26,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
2626 let version = Bundle . main . infoDictionary ? [ " CFBundleShortVersionString " ] as? String ?? " ? "
2727 let build = Bundle . main . infoDictionary ? [ " CFBundleVersion " ] as? String ?? " ? "
2828 Log . app . info ( " [AppDelegate] launched v \( version , privacy : . public ) (build \( build , privacy : . public ) ) " )
29- ShortcutSettings . shared . applyAppearance ( )
29+ AppSettings . shared . applyAppearance ( )
3030 setupMenuBar ( )
3131 panelController = SidePanelController ( )
3232 SidecarMigration . runIfNeeded ( )
@@ -38,7 +38,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
3838 // non-blocking storage-root picker as the panel's empty state instead of the
3939 // note list. The persistent active root's notes are loaded already; picking a
4040 // root in the picker switches to it for the session (temporary override).
41- if ShortcutSettings . shared . askOnLaunch , ShortcutSettings . shared . storageRoots . count >= 2 {
41+ if StorageSettings . shared . askOnLaunch , StorageSettings . shared . storageRoots . count >= 2 {
4242 panelController ? . noteStore . awaitingRootChoice = true
4343 }
4444
@@ -52,7 +52,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
5252 }
5353
5454 // Auto-check for updates on launch (24h throttle, respects user setting)
55- if ShortcutSettings . shared . autoCheckUpdates {
55+ if AppSettings . shared . autoCheckUpdates {
5656 Task {
5757 await checkForUpdatesOnLaunch ( )
5858 }
@@ -147,8 +147,8 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
147147 // While the ask-on-launch picker is up, no root has been chosen for the session
148148 // yet (sessionRootOverride is nil) — show no checkmark until one is picked.
149149 let awaiting = panelController ? . noteStore . awaitingRootChoice ?? false
150- let activeID = awaiting ? nil : ShortcutSettings . shared . activeStorageRoot ? . id
151- for root in ShortcutSettings . shared . storageRoots {
150+ let activeID = awaiting ? nil : StorageSettings . shared . activeStorageRoot ? . id
151+ for root in StorageSettings . shared . storageRoots {
152152 let item = NSMenuItem (
153153 title : root . displayName ,
154154 action : #selector( switchToStorageRoot ( sender : ) ) ,
@@ -159,18 +159,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
159159 item . state = ( root . id == activeID ) ? . on : . off
160160 submenu . addItem ( item )
161161 }
162- if ! ShortcutSettings . shared . storageRoots . isEmpty {
162+ if ! StorageSettings . shared . storageRoots . isEmpty {
163163 submenu . addItem ( . separator ( ) )
164164 let hint = NSMenuItem ( title : L10n . shared [ " menu.storageTemporary " ] , action : nil , keyEquivalent : " " )
165165 hint . isEnabled = false
166166 submenu . addItem ( hint )
167167 }
168- storageMenuItem ? . isHidden = ShortcutSettings . shared . storageRoots . count < 2
168+ storageMenuItem ? . isHidden = StorageSettings . shared . storageRoots . count < 2
169169 }
170170
171171 @ objc private func switchToStorageRoot ( sender : NSMenuItem ) {
172172 guard let id = sender . representedObject as? String ,
173- let root = ShortcutSettings . shared . storageRoots . first ( where : { $0 . id == id } )
173+ let root = StorageSettings . shared . storageRoots . first ( where : { $0 . id == id } )
174174 else { return }
175175 switchRoot ( to : root , temporary : true )
176176 }
@@ -185,11 +185,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
185185 panel . prompt = L10n . shared [ " common.select " ]
186186
187187 // Pre-select current storage directory
188- panel . directoryURL = ShortcutSettings . shared . resolvedStorageDirectory
188+ panel . directoryURL = StorageSettings . shared . resolvedStorageDirectory
189189
190190 panel . begin { [ weak self ] response in
191191 guard response == . OK , let newURL = panel . url else { return }
192- let oldURL = ShortcutSettings . shared . resolvedStorageDirectory
192+ let oldURL = StorageSettings . shared . resolvedStorageDirectory
193193 guard newURL != oldURL else { return }
194194
195195 // Save dirty notes to old location first
@@ -200,7 +200,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
200200 Self . migrateStorageContents ( from : oldURL , to : newURL )
201201
202202 // Update the roots model: the migrated-to dir becomes the active root.
203- var roots = ShortcutSettings . shared . storageRoots
203+ var roots = StorageSettings . shared . storageRoots
204204 let activeID : String
205205 if let existing = roots . first ( where : { $0 . url == newURL } ) {
206206 activeID = existing . id
@@ -209,9 +209,9 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
209209 roots . append ( root )
210210 activeID = root . id
211211 }
212- ShortcutSettings . shared . storageRoots = roots
213- ShortcutSettings . shared . activeRootID = activeID
214- ShortcutSettings . shared . sessionRootOverride = nil
212+ StorageSettings . shared . storageRoots = roots
213+ StorageSettings . shared . activeRootID = activeID
214+ StorageSettings . shared . sessionRootOverride = nil
215215 // Reload notes AND sidecar from the new location (the old changeNotesFolder
216216 // path reloaded notes but not the sidecar — a latent bug fixed here).
217217 try? SidecarStore . shared . load ( )
@@ -241,18 +241,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
241241 panelController ? . noteStore . awaitingRootChoice = false
242242 }
243243 // Don't no-op-switch to the already-active root.
244- if ShortcutSettings . shared . activeStorageRoot ? . id == root . id {
244+ if StorageSettings . shared . activeStorageRoot ? . id == root . id {
245245 return
246246 }
247247
248248 // Flush unsaved edits in the outgoing root before switching.
249249 panelController ? . noteStore . saveDirtyNotes ( )
250250
251251 if temporary {
252- ShortcutSettings . shared . sessionRootOverride = root
252+ StorageSettings . shared . sessionRootOverride = root
253253 } else {
254- ShortcutSettings . shared . sessionRootOverride = nil
255- ShortcutSettings . shared . activeRootID = root . id
254+ StorageSettings . shared . sessionRootOverride = nil
255+ StorageSettings . shared . activeRootID = root . id
256256 }
257257
258258 // Reload sidecar (per-root meta.json) and notes for the new root, inside
@@ -318,7 +318,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
318318 }
319319
320320 private func fireBackgroundCheck ( ) {
321- guard ShortcutSettings . shared . autoCheckUpdates else { return }
321+ guard AppSettings . shared . autoCheckUpdates else { return }
322322 Task {
323323 await updateState . check ( source : . launch )
324324 if case let . available ( release ) = updateState . status {
0 commit comments