From b536468a2c0ed351e18a55f42cb51b7ef9cfbedf Mon Sep 17 00:00:00 2001 From: Erik Gomez Date: Fri, 24 May 2024 12:31:32 -0500 Subject: [PATCH] move sofa logic to a function so it can be called after other logc --- Nudge/UI/Main.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Nudge/UI/Main.swift b/Nudge/UI/Main.swift index e2a585aa..2becefb7 100644 --- a/Nudge/UI/Main.swift +++ b/Nudge/UI/Main.swift @@ -171,9 +171,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { // print("applicationWillBecomeActive") } - // Pre-Launch Logic - func applicationWillFinishLaunching(_ notification: Notification) { - // print("applicationWillFinishLaunching") + func sofaPreLaunchLogic() { // TODO: Add more logging to "unsupported devices" UI. // TODO: Add localization for "unsupported devices" text fields // TODO: Get someone to update JAMF JSON schema for all the new keys and wiki @@ -255,11 +253,17 @@ class AppDelegate: NSObject, NSApplicationDelegate { LogManager.error("Could not fetch SOFA feed", logger: sofaLog) } } + } + + // Pre-Launch Logic + func applicationWillFinishLaunching(_ notification: Notification) { + // print("applicationWillFinishLaunching") handleSMAppService() checkForBadProfilePath() handleCommandLineArguments() applyGracePeriodLogic() applyRandomDelayIfNecessary() + sofaPreLaunchLogic() updateNudgeState() handleSoftwareUpdateRequirements() }