|
@ -33,12 +33,21 @@ extension PopupNotificationWireframe: PopupNotificationWireframeInput { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func show(source: UIViewController) { |
|
|
func show(source: UIViewController) { |
|
|
|
|
|
let now = Date() |
|
|
|
|
|
|
|
|
|
|
|
// FIXME: Temporary expire date |
|
|
|
|
|
if let expireDate = UserDefaults |
|
|
|
|
|
.standard |
|
|
|
|
|
.object(forKey: AppConstants.dateOfExpireNotification) as? Date { |
|
|
|
|
|
if let remindDate = expireDate - now, remindDate <= 0 { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if let date = UserDefaults |
|
|
if let date = UserDefaults |
|
|
.standard |
|
|
.standard |
|
|
.object(forKey: AppConstants.dateOfDontShowNotification) as? Date { |
|
|
.object(forKey: AppConstants.dateOfDontShowNotification) as? Date { |
|
|
|
|
|
|
|
|
let now = Date() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: if now - date == 0 then don't show notification else show notification and delete dateOfDontShowNotification |
|
|
// TODO: if now - date == 0 then don't show notification else show notification and delete dateOfDontShowNotification |
|
|
|
|
|
|
|
|
if let remindDate = now - date, remindDate == 0 { |
|
|
if let remindDate = now - date, remindDate == 0 { |
|
|