everything changed

This commit is contained in:
Trey t
2022-02-20 14:33:58 -06:00
parent 1cf38cb854
commit 0035f61204
50 changed files with 2155 additions and 875 deletions

View File

@@ -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