From d7042d18a68b2d035698b522a36bae2307d6d635 Mon Sep 17 00:00:00 2001 From: Buds Date: Thu, 31 Jan 2019 17:55:07 +0100 Subject: [PATCH] fix uniqness of update toasts --- src/renderer/components/LandingPage.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/renderer/components/LandingPage.vue b/src/renderer/components/LandingPage.vue index ea61bc4ff..e83515428 100644 --- a/src/renderer/components/LandingPage.vue +++ b/src/renderer/components/LandingPage.vue @@ -315,14 +315,17 @@ export default Vue.extend({ if (status === "download-progress") { this.updater.progress = Math.floor(arg.percent); } - if (status === "update-available" && this.isMac) { + if (status === "update-available" && this.isMac && !this.updateToast) { // show download toast on Macs - this.message( + this.updateToast = this.message( this.$t("app.main.updatefound" /* Companion Update available */), null, { className: "update", - duration: null + duration: null, + onComplete: () => { + this.updateToast = null; + } } ); } @@ -338,7 +341,7 @@ export default Vue.extend({ } if (status === "update-downloaded") { if (!this.updateToast) { - this.message( + this.updateToast = this.message( this.$t("app.main.updatedownload" /* Client update downloaded */), null, {