feat: initialized the setup window with a first screen (welcome screen)

This commit is contained in:
Serhiy Mytrovtsiy
2022-07-22 17:32:54 +02:00
parent 76856da1ca
commit aba18eafae
4 changed files with 239 additions and 3 deletions

View File

@@ -136,6 +136,22 @@ extension AppDelegate {
}
}
internal func setup(completion: @escaping () -> Void) {
if Store.shared.exist(key: "setupProcess") || Store.shared.exist(key: "runAtLoginInitialized") {
completion()
return
}
debug("showing the setup window")
self.setupWindow.show()
self.setupWindow.finishHandler = {
debug("setup is finished, starting the app")
completion()
}
Store.shared.set(key: "setupProcess", value: true)
}
internal func checkForNewVersion(silent: Bool = false) {
updater.check { result, error in
if error != nil {