Skip to content

Commit

Permalink
fix: Change download notify info
Browse files Browse the repository at this point in the history
  • Loading branch information
yanguoyu committed Jul 31, 2023
1 parent c90b01d commit e127824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/neuron-wallet/src/controllers/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit e127824

Please sign in to comment.