mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
SetupWizard: wait for proper detection of the OS before opening the wizard.
This commit is contained in:
@@ -190,16 +190,28 @@ ShellRoot {
|
||||
function onSettingsLoaded() {
|
||||
// Only open the setup wizard for new users
|
||||
if (!Settings.data.setupCompleted) {
|
||||
if (DistroService && DistroService.isNixOS) {
|
||||
Settings.data.setupCompleted = true
|
||||
return
|
||||
}
|
||||
if (Settings.data.settingsVersion >= Settings.settingsVersion) {
|
||||
setupWizardLoader.active = true
|
||||
} else {
|
||||
Settings.data.setupCompleted = true
|
||||
}
|
||||
checkSetupWizard()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkSetupWizard() {
|
||||
// Wait for distro service
|
||||
if (!DistroService.isReady) {
|
||||
Qt.callLater(checkSetupWizard)
|
||||
return
|
||||
}
|
||||
|
||||
// No setup wizard on NixOS
|
||||
if (DistroService.isNixOS) {
|
||||
Settings.data.setupCompleted = true
|
||||
return
|
||||
}
|
||||
|
||||
if (Settings.data.settingsVersion >= Settings.settingsVersion) {
|
||||
setupWizardLoader.active = true
|
||||
} else {
|
||||
Settings.data.setupCompleted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user