Skip to content

Commit 057106e

Browse files
committed
disable randomDelay when using -demo-mode
1 parent 32fa490 commit 057106e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Nudge.xcodeproj/xcshareddata/xcschemes/Nudge - Debug (-demo-mode).xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
</BuildableProductRunnable>
7373
<CommandLineArguments>
7474
<CommandLineArgument
75-
argument = "-demo-mode-json"
75+
argument = "-demo-mode"
7676
isEnabled = "YES">
7777
</CommandLineArgument>
7878
</CommandLineArguments>

Nudge/UI/Main.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
173173
}
174174

175175
func sofaPreLaunchLogic() {
176-
// TODO: Add more logging to "unsupported devices" UI.
177176
if OptionalFeatureVariables.utilizeSOFAFeed {
178177
var selectedOS: OSInformation?
179178
var foundMatch = false
@@ -353,7 +352,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
353352
}
354353

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

0 commit comments

Comments
 (0)