From e12782415b691d572c006ae8dae2226616a12f49 Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Mon, 31 Jul 2023 19:42:29 +0800 Subject: [PATCH] fix: Change download notify info --- packages/neuron-wallet/src/controllers/update.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/neuron-wallet/src/controllers/update.ts b/packages/neuron-wallet/src/controllers/update.ts index 80142657ce..f5dc62ca89 100644 --- a/packages/neuron-wallet/src/controllers/update.ts +++ b/packages/neuron-wallet/src/controllers/update.ts @@ -36,14 +36,14 @@ export default class UpdateController { } public downloadUpdate() { - this.notify({ downloadProgress: 0 }) + this.notify({ ...UpdateController.lastNotifyInfo, downloadProgress: 0 }) UpdateController.downCancellationToken = new CancellationToken() autoUpdater.downloadUpdate(UpdateController.downCancellationToken) } public cancelDownloadUpdate() { UpdateController.downCancellationToken.cancel() - this.notify(UpdateController.lastNotifyInfo) + this.notify({ ...UpdateController.lastNotifyInfo, downloadProgress: -1 }) autoUpdater.removeAllListeners() }