瀏覽代碼

Fixed sound for carbsReq if disabled

Ivan Valkou 4 年之前
父節點
當前提交
a807008f04
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      FreeAPS/Sources/Services/UserNotifiactions/UserNotificationsManager.swift

+ 1 - 1
FreeAPS/Sources/Services/UserNotifiactions/UserNotificationsManager.swift

@@ -83,7 +83,7 @@ final class BaseUserNotificationsManager: NSObject, UserNotificationsManager, In
                 titles.append(NSLocalizedString("(Snoozed)", comment: "(Snoozed)"))
                 titles.append(NSLocalizedString("(Snoozed)", comment: "(Snoozed)"))
             } else {
             } else {
                 content.sound = .default
                 content.sound = .default
-                self.playSound()
+                self.playSoundIfNeeded()
             }
             }
 
 
             titles.append(String(format: NSLocalizedString("Carbs required: %d g", comment: "Carbs required"), carbs))
             titles.append(String(format: NSLocalizedString("Carbs required: %d g", comment: "Carbs required"), carbs))