From 75bcbdb3d127be61ccabc3138ac38865be327eca Mon Sep 17 00:00:00 2001 From: Marcin Cichocki Date: Thu, 16 Sep 2021 15:33:16 +0200 Subject: [PATCH] fix(client-electron): show release notes only once fixes #184 --- src/electron/main/updater.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/electron/main/updater.ts b/src/electron/main/updater.ts index 554fc282..bb9444f7 100644 --- a/src/electron/main/updater.ts +++ b/src/electron/main/updater.ts @@ -12,6 +12,8 @@ import { Store } from './store/store'; export class BreachProtocolAutosolverUpdater { private autoUpdate: boolean = null; + private wereReleseNotesShown = false; + constructor( private store: Store, private renderer: Electron.webContents, @@ -82,8 +84,9 @@ export class BreachProtocolAutosolverUpdater { } private onUpdateNotAvailable(info: UpdateInfo) { - if (this.isFirstRun) { + if (this.isFirstRun && !this.wereReleseNotesShown) { this.renderer.send('main:show-release-notes', info); + this.wereReleseNotesShown = true; } this.setUpdateStatus(UpdateStatus.UpdateNotAvailable);