Skip to content

Commit

Permalink
disable randomDelay when using -demo-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Jul 23, 2024
1 parent 32fa490 commit 057106e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</BuildableProductRunnable>
<CommandLineArguments>
<CommandLineArgument
argument = "-demo-mode-json"
argument = "-demo-mode"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
Expand Down
3 changes: 1 addition & 2 deletions Nudge/UI/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

func sofaPreLaunchLogic() {
// TODO: Add more logging to "unsupported devices" UI.
if OptionalFeatureVariables.utilizeSOFAFeed {
var selectedOS: OSInformation?
var foundMatch = false
Expand Down Expand Up @@ -353,7 +352,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

private func applyRandomDelayIfNecessary() {
if UserExperienceVariables.randomDelay && !(CommandLineUtilities().disableRandomDelayArgumentPassed() || CommandLineUtilities().unitTestingEnabled()) {
if UserExperienceVariables.randomDelay && !(CommandLineUtilities().disableRandomDelayArgumentPassed() || CommandLineUtilities().unitTestingEnabled() || CommandLineUtilities().demoModeEnabled()) {
let delaySeconds = Int.random(in: 1...UserExperienceVariables.maxRandomDelayInSeconds)
LogManager.notice("Delaying initial run (in seconds) by: \(delaySeconds)", logger: uiLog)

Expand Down

0 comments on commit 057106e

Please sign in to comment.