Ariver
2026-06-27 369c8f03db2f6d507697ab2296db5e6f81c8cd1e
src/Apptag/AppDefaults.swift
@@ -13,9 +13,11 @@
    static let launchAtLogin = true
    static let showUncommonAppBubbles = false
    static let hideUsageTips = false
    static let appGridThemeID = AppGridTheme.defaultLight.rawValue
    static let useAppKitTagNavigation = true
    static func register() {
        migrateAppGridThemePreferenceIfNeeded()
        UserDefaults.standard.register(defaults: [
            "tagFontSize": tagFontSize,
            "iconSize": iconSize,
@@ -26,9 +28,11 @@
            "launchAtLogin": launchAtLogin,
            "showUncommonAppBubbles": showUncommonAppBubbles,
            "hideUsageTips": hideUsageTips,
            AppGridTheme.storageKey: appGridThemeID,
            "useAppKitTagNavigation": useAppKitTagNavigation,
            "skipTagRemovalDropConfirm": false,
            "skipUncategorizedDropConfirm": false,
            "skipUsageTipsCloseReminder": false,
            LauncherHotkeyRegistrationStore.mainStateKey: LauncherHotkeyRegistrationState.active.rawValue,
            LauncherHotkeyRegistrationStore.quickSearchStateKey: LauncherHotkeyRegistrationState.active.rawValue
        ])
@@ -40,6 +44,15 @@
        return UserDefaults.standard.persistentDomain(forName: domain)?[key] != nil
    }
    private static func migrateAppGridThemePreferenceIfNeeded() {
        let defaults = UserDefaults.standard
        guard !hasStoredValue(for: AppGridTheme.storageKey),
              hasStoredValue(for: "useDarkAppGrid"),
              defaults.bool(forKey: "useDarkAppGrid")
        else { return }
        defaults.set(AppGridTheme.deepBlue.rawValue, forKey: AppGridTheme.storageKey)
    }
    private static func removeShortcutCustomizationDefaults() {
        let defaults = UserDefaults.standard
        [