Преглед изворни кода

disable carb notifications during snooze time

kskandis пре 1 година
родитељ
комит
04bb026f1d

+ 3 - 4
Trio/Sources/Services/UserNotifications/UserNotificationsManager.swift

@@ -166,11 +166,10 @@ final class BaseUserNotificationsManager: NSObject, UserNotificationsManager, In
         let content = UNMutableNotificationContent()
 
         if snoozeUntilDate > Date() {
-            titles.append(String(localized: "(Snoozed)", comment: "(Snoozed)"))
-        } else {
-            content.sound = .default
-            playSoundIfNeeded()
+            return
         }
+        content.sound = .default
+        playSoundIfNeeded()
 
         titles.append(String(format: String(localized: "Carbs required: %d g", comment: "Carbs required"), carbs))