change a bunch of shit to get importing / adding new vote have the right weekday
This commit is contained in:
@@ -58,15 +58,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
|
||||
|
||||
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
|
||||
if let action = LocalNotification.ActionType(rawValue: response.actionIdentifier) {
|
||||
var date: Date
|
||||
|
||||
switch savedOnboardingData.inputDay {
|
||||
case .Today:
|
||||
date = Date()
|
||||
case .Previous:
|
||||
date = Calendar.current.date(byAdding: .day, value: -1, to: Date())!
|
||||
}
|
||||
|
||||
let date = ShowBasedOnVoteLogics.getCurrentVotingDate(onboardingData: savedOnboardingData)
|
||||
switch action {
|
||||
case .horrible:
|
||||
PersistenceController.shared.add(mood: .horrible, forDate: date, entryType: .notification)
|
||||
|
||||
Reference in New Issue
Block a user