Skip to content

Commit

Permalink
Fixed notification identifier issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
fakerabbit committed Mar 15, 2017
1 parent f1823b8 commit 134c3bb
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash1136.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash1334.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash2208.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash480.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash960-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Memoria/Assets.xcassets/LaunchImage.launchimage/splash960.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions Memoria/DataMgr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,21 @@ class DataMgr {
func programCard(card: Card, difficulty: Int) {

let center = UNUserNotificationCenter.current()
let identifier = "UYLLocalNotification"
let identifier = NSUUID().uuidString

var date = Date()
switch difficulty {
case Difficulty.easy.rawValue:
case Difficulty.hard.rawValue:
date = date.addingTimeInterval(240)
break
case Difficulty.good.rawValue:
date = date.addingTimeInterval(600)
break
case Difficulty.hard.rawValue:
case Difficulty.easy.rawValue:
date = Calendar.current.date(byAdding: .day, value: 1, to: date)!
break
default:
date = date.addingTimeInterval(60)
date = date.addingTimeInterval(120)
}
var triggerDate = Calendar.current.dateComponents([.year,.month,.day,.hour,.minute,.second,], from: date)
triggerDate.timeZone = TimeZone.current
Expand Down

0 comments on commit 134c3bb

Please sign in to comment.