Skip to content

Commit

Permalink
fix uniqness of update toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds committed Jan 31, 2019
1 parent 0c9238a commit d7042d1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/renderer/components/LandingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
);
}
Expand All @@ -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,
{
Expand Down

0 comments on commit d7042d1

Please sign in to comment.