Skip to content

Commit

Permalink
PZBaseKit // Trim unused UserDefaults keys regarding notification.
Browse files Browse the repository at this point in the history
- Only those UserDefaults keys in PZAccountKit are needed.
  • Loading branch information
ShikiSuen committed Nov 9, 2024
1 parent 243abfc commit 889c6aa
Showing 1 changed file with 0 additions and 75 deletions.
75 changes: 0 additions & 75 deletions Packages/PZKit/Sources/PZBaseKit/UserDefaultsKeys_Base.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,78 +91,3 @@ extension Defaults.Keys {
public static let resinRecoveryLiveActivityUseCustomizeBackground =
Key<Bool>("resinRecoveryLiveActivityUseCustomizeBackground", default: false, suite: .baseSuite)
}

// MARK: - UserNotificationCenter

extension Defaults.Keys {
public static let allowResinNotification = Key<Bool>("allowResinNotification", default: true, suite: .baseSuite)
// 得保留「resinNotificationNum」原始 rawValue 命名,不然无法继承用户既有设定。
public static let resinNotificationThreshold = Key<Double>(
"resinNotificationNum",
default: 180,
suite: .baseSuite
)
public static let allowFullResinNotification = Key<Bool>(
"allowFullResinNotification",
default: true,
suite: .baseSuite
)
public static let allowHomeCoinNotification = Key<Bool>(
"allowHomeCoinNotification",
default: true,
suite: .baseSuite
)
public static let homeCoinNotificationHourBeforeFull = Key<Double>(
"homeCoinNotificationHourBeforeFull",
default: 8,
suite: .baseSuite
)
public static let allowExpeditionNotification = Key<Bool>(
"allowExpeditionNotification",
default: true,
suite: .baseSuite
)
public static let noticeExpeditionMethodRawValue = Key<Int>(
"noticeExpeditionMethodRawValue",
default: 1,
suite: .baseSuite
)
public static let allowWeeklyBossesNotification = Key<Bool>(
"allowWeeklyBossesNotification",
default: true,
suite: .baseSuite
)
public static let allowTransformerNotification = Key<Bool>(
"allowTransformerNotification",
default: true,
suite: .baseSuite
)
public static let allowDailyTaskNotification = Key<Bool>(
"allowDailyTaskNotification",
default: true,
suite: .baseSuite
)

public static let weeklyBossesNotificationTimePointData = Key<Data>(
"weeklyBossesNotificationTimePointData",
default: try! JSONEncoder().encode(DateComponents(
calendar: Calendar.current,
hour: 19,
minute: 0,
weekday: 7
)),
suite: .baseSuite
)

public static let dailyTaskNotificationTimePointData = Key<Data>(
"dailyTaskNotificationTimePointData",
default: try! JSONEncoder().encode(DateComponents(calendar: Calendar.current, hour: 19, minute: 0)),
suite: .baseSuite
)

public static let notificationIgnoreUidsData = Key<Data>(
"notificationIgnoreUidsData",
default: try! JSONEncoder().encode([String]()),
suite: .baseSuite
)
}

0 comments on commit 889c6aa

Please sign in to comment.