From 889c6aa5099020fe7d1d4da28ca316d4423cf47f Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 9 Nov 2024 15:41:06 +0800 Subject: [PATCH] PZBaseKit // Trim unused UserDefaults keys regarding notification. - Only those UserDefaults keys in PZAccountKit are needed. --- .../PZBaseKit/UserDefaultsKeys_Base.swift | 75 ------------------- 1 file changed, 75 deletions(-) diff --git a/Packages/PZKit/Sources/PZBaseKit/UserDefaultsKeys_Base.swift b/Packages/PZKit/Sources/PZBaseKit/UserDefaultsKeys_Base.swift index 71af7eaec..dc6e8e655 100644 --- a/Packages/PZKit/Sources/PZBaseKit/UserDefaultsKeys_Base.swift +++ b/Packages/PZKit/Sources/PZBaseKit/UserDefaultsKeys_Base.swift @@ -91,78 +91,3 @@ extension Defaults.Keys { public static let resinRecoveryLiveActivityUseCustomizeBackground = Key("resinRecoveryLiveActivityUseCustomizeBackground", default: false, suite: .baseSuite) } - -// MARK: - UserNotificationCenter - -extension Defaults.Keys { - public static let allowResinNotification = Key("allowResinNotification", default: true, suite: .baseSuite) - // 得保留「resinNotificationNum」原始 rawValue 命名,不然无法继承用户既有设定。 - public static let resinNotificationThreshold = Key( - "resinNotificationNum", - default: 180, - suite: .baseSuite - ) - public static let allowFullResinNotification = Key( - "allowFullResinNotification", - default: true, - suite: .baseSuite - ) - public static let allowHomeCoinNotification = Key( - "allowHomeCoinNotification", - default: true, - suite: .baseSuite - ) - public static let homeCoinNotificationHourBeforeFull = Key( - "homeCoinNotificationHourBeforeFull", - default: 8, - suite: .baseSuite - ) - public static let allowExpeditionNotification = Key( - "allowExpeditionNotification", - default: true, - suite: .baseSuite - ) - public static let noticeExpeditionMethodRawValue = Key( - "noticeExpeditionMethodRawValue", - default: 1, - suite: .baseSuite - ) - public static let allowWeeklyBossesNotification = Key( - "allowWeeklyBossesNotification", - default: true, - suite: .baseSuite - ) - public static let allowTransformerNotification = Key( - "allowTransformerNotification", - default: true, - suite: .baseSuite - ) - public static let allowDailyTaskNotification = Key( - "allowDailyTaskNotification", - default: true, - suite: .baseSuite - ) - - public static let weeklyBossesNotificationTimePointData = Key( - "weeklyBossesNotificationTimePointData", - default: try! JSONEncoder().encode(DateComponents( - calendar: Calendar.current, - hour: 19, - minute: 0, - weekday: 7 - )), - suite: .baseSuite - ) - - public static let dailyTaskNotificationTimePointData = Key( - "dailyTaskNotificationTimePointData", - default: try! JSONEncoder().encode(DateComponents(calendar: Calendar.current, hour: 19, minute: 0)), - suite: .baseSuite - ) - - public static let notificationIgnoreUidsData = Key( - "notificationIgnoreUidsData", - default: try! JSONEncoder().encode([String]()), - suite: .baseSuite - ) -}