everything changed
This commit is contained in:
@@ -28,6 +28,14 @@ class LocalNotification {
|
||||
}
|
||||
}
|
||||
|
||||
public class func rescheduleNotifiations() {
|
||||
if let data = GroupUserDefaults.groupDefaults.object(forKey: UserDefaultsStore.Keys.savedOnboardingData.rawValue) as? Data,
|
||||
let model = try? JSONDecoder().decode(OnboardingData.self, from: data) {
|
||||
LocalNotification.scheduleReminder(atTime: model.date,
|
||||
withTitle: model.title)
|
||||
}
|
||||
}
|
||||
|
||||
public class func scheduleReminder(atTime time: Date, withTitle title: String) {
|
||||
self.removeNotificaiton()
|
||||
|
||||
@@ -37,7 +45,7 @@ class LocalNotification {
|
||||
let _ = LocalNotification.createNotificationCategory()
|
||||
|
||||
let notificationContent = UNMutableNotificationContent()
|
||||
notificationContent.title = title
|
||||
notificationContent.title = UserDefaultsStore.personalityPackable().randomPushNotificationTitle()
|
||||
|
||||
notificationContent.badge = NSNumber(value: 1)
|
||||
notificationContent.sound = .default
|
||||
|
||||
Reference in New Issue
Block a user