From 0add0657aa5dc03125db6834354dfbb82eaefe03 Mon Sep 17 00:00:00 2001 From: Erik Gomez Date: Tue, 4 Jun 2024 14:51:56 -0500 Subject: [PATCH] fix bug in launch delay logic --- Nudge/Utilities/Utils.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Nudge/Utilities/Utils.swift b/Nudge/Utilities/Utils.swift index 59905716..3d3d36ff 100644 --- a/Nudge/Utilities/Utils.swift +++ b/Nudge/Utilities/Utils.swift @@ -177,6 +177,9 @@ struct AppStateManager { } func delayNudgeEventLogic(currentDate: Date = DateManager().getCurrentDate(), testFileDate: Date? = nil) -> Date { + if UserExperienceVariables.nudgeEventLaunchDelay == 0 { + return PrefsWrapper.requiredInstallationDate + } if releaseDate.addingTimeInterval(TimeInterval(UserExperienceVariables.nudgeEventLaunchDelay * 86400)) > currentDate { LogManager.info("Device within nudgeEventLaunchDelay, exiting Nudge", logger: uiLog) nudgePrimaryState.shouldExit = true