Skip to content

Commit

Permalink
better log updateEventLaunchDelay
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Aug 1, 2024
1 parent 5d9cb62 commit f5b7a43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Nudge/Utilities/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ struct AppStateManager {
return PrefsWrapper.requiredInstallationDate
}

if releaseDate.addingTimeInterval(TimeInterval(launchDelay * 86400)) > currentDate {
let potentialLaunchDelay = releaseDate.addingTimeInterval(TimeInterval(launchDelay * 86400))

if potentialLaunchDelay > currentDate {
let eventType = isMajorUpgradeRequired ? "nudgeMajorUpgradeEventLaunchDelay" : "nudgeMinorUpdateEventLaunchDelay"
LogManager.info("Device within \(eventType)", logger: uiLog)
LogManager.notice("Device within \(eventType) - Current Date: \(currentDate), Respected Date: \(potentialLaunchDelay)", logger: uiLog)
nudgePrimaryState.shouldExit = true
return currentDate
} else {
Expand Down

0 comments on commit f5b7a43

Please sign in to comment.