This commit is contained in:
Johan Degraeve 2024-02-25 22:01:47 +01:00
parent 7acb5734ff
commit c389fccea7
1 changed files with 1 additions and 1 deletions

View File

@ -2101,7 +2101,7 @@ final class RootViewController: UIViewController, ObservableObject {
// check if notification on home screen is enabled in the settings
// and also if last notification was long enough ago (longer than UserDefaults.standard.notificationInterval), except if there would have been a disconnect since previous notification (simply because I like getting a new reading with a notification by disabling/reenabling bluetooth
if UserDefaults.standard.showReadingInNotification && !overrideShowReadingInNotification && (abs(timeStampLastBGNotification.timeIntervalSince(Date())) > Double(UserDefaults.standard.notificationInterval) * 60.0 || lastConnectionStatusChangeTimeStamp().timeIntervalSince(timeStampLastBGNotification) > 0) {
if UserDefaults.standard.showReadingInNotification && !overrideShowReadingInNotification && (abs(timeStampLastBGNotification.timeIntervalSince(Date())) > Double(UserDefaults.standard.notificationInterval) * 60.0) {
// Create Notification Content
let notificationContent = UNMutableNotificationContent()