From ccc2009ed844ecbed6f5865b9e0d85c9fcd955da Mon Sep 17 00:00:00 2001 From: jackd320 Date: Mon, 10 Apr 2023 22:57:03 +0800 Subject: [PATCH] Signed-off-by: jackd320 --- product/oh/base/src/main/ets/pages/newVersion.ets | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/product/oh/base/src/main/ets/pages/newVersion.ets b/product/oh/base/src/main/ets/pages/newVersion.ets index 660fbc3..777b702 100644 --- a/product/oh/base/src/main/ets/pages/newVersion.ets +++ b/product/oh/base/src/main/ets/pages/newVersion.ets @@ -74,7 +74,11 @@ struct NewVersion { }, confirm: () => { globalThis.displayCountdownDialog = false; - this.upgrade(); + if (this.isABInstall()) { + this.reboot(); + } else { + this.upgrade(); + } } }), autoCancel: false, @@ -170,7 +174,7 @@ struct NewVersion { this.buttonText = FormatUtils.toUpperCase(globalThis.abilityContext, stateButtonText); this.isButtonVisible = this.updateStatus !== UpdateState.INSTALLING && this.updateStatus !== UpdateState.INSTALL_FAILED - && this.updateStatus !== UpdateState.INSTALL_SUCCESS + && (this.isABInstall() || this.updateStatus !== UpdateState.INSTALL_SUCCESS) && this.updateStatus !== UpdateState.UPGRADING && this.updateStatus !== UpdateState.UPGRADE_FAILED && this.updateStatus !== UpdateState.UPGRADE_SUCCESS; -- Gitee