SDA-3875 - Skip welcome screen for auto update (#1497)

This commit is contained in:
Kiran Niranjan
2022-09-20 12:57:30 +05:30
committed by GitHub
parent 19e001aa42
commit 52cae21865
2 changed files with 15 additions and 1 deletions

View File

@@ -95,8 +95,9 @@ export class AutoUpdate {
if (isMac) {
windowHandler.setIsAutoUpdating(true);
}
setImmediate(() => {
setImmediate(async () => {
if (this.autoUpdater) {
await config.updateUserConfig({ startedAfterAutoUpdate: true });
if (isMac) {
config.backupGlobalConfig();
}

View File

@@ -57,6 +57,7 @@ export interface IConfig {
locale?: string;
installVariant?: string;
bootCount?: number;
startedAfterAutoUpdate?: boolean;
}
export interface IGlobalConfig {
@@ -574,6 +575,18 @@ class Config {
return;
}
if (
this.userConfig &&
(this.userConfig as IConfig).startedAfterAutoUpdate
) {
await this.updateUserConfig({
installVariant: this.installVariant,
startedAfterAutoUpdate: false,
});
this.isFirstTime = false;
return;
}
if (
installVariant &&
typeof installVariant === 'string' &&