From 3ca5b9192ee0424b187a309da84847ecddc080bb Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 29 Apr 2016 08:24:35 +0100 Subject: [PATCH] Close an open toast before opening a new one --- src/gui/html/js/dialog.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/html/js/dialog.js b/src/gui/html/js/dialog.js index 0115910e..630747ba 100644 --- a/src/gui/html/js/dialog.js +++ b/src/gui/html/js/dialog.js @@ -44,8 +44,10 @@ static showNotification(text) { const toast = document.getElementById('toast'); - toast.text = text; - toast.show(); + if (toast.opened) { + toast.hide(); + } + toast.show(text); } }; }));