Skip to content

Commit

Permalink
fix bug in launch delay logic
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jun 4, 2024
1 parent 4b1f4dd commit 0add065
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Nudge/Utilities/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0add065

Please sign in to comment.