prevent duplicate messages

This commit is contained in:
Christian Herzog
2019-10-03 21:57:41 +02:00
parent 6255c5809f
commit 56a6fd6e55

View File

@@ -19,6 +19,7 @@ var commandHeader = 'squeezelite -b 500:2000 -d all=info ';
var pname, ver, otapct, otadsc; var pname, ver, otapct, otadsc;
var blockAjax = false; var blockAjax = false;
var blockFlashButton = false; var blockFlashButton = false;
var lastMsg = '';
var apList = null; var apList = null;
var selectedSSID = ""; var selectedSSID = "";
@@ -631,7 +632,11 @@ function checkStatus(){
$("span#flash-status").html(''); $("span#flash-status").html('');
} }
if (data.hasOwnProperty('message') && data['message'] != ''){ if (data.hasOwnProperty('message') && data['message'] != ''){
showMessage(data['message']); var msg = data['message'];
if (msg != lastMsg) {
showMessage(msg);
lastMsg = msg;
}
} }
blockAjax = false; blockAjax = false;
}) })