Fixed a bug where the alert list would extend endlessly with WebSockets disabled or if a user has too many alerts.
Fixed a bug where the wrong alerts would be removed if a alert dismissal event is received for an alert which isn't in the client cache.
This commit is contained in:
parent
a13b575b72
commit
01040b200d
|
@ -112,6 +112,8 @@ function loadAlerts(menuAlerts) {
|
|||
setAlertError(menuAlerts,data.errmsg)
|
||||
return;
|
||||
}
|
||||
alertList = [];
|
||||
alertMapping = {};
|
||||
for(var i in data.msgs) {
|
||||
addAlert(data.msgs[i]);
|
||||
}
|
||||
|
@ -214,6 +216,7 @@ function runWebSockets() {
|
|||
index = i;
|
||||
}
|
||||
}
|
||||
if(index==-1) return;
|
||||
|
||||
for(var i = index; (i+1) < alertList.length; i++) {
|
||||
alertList[i] = alertList[i+1];
|
||||
|
|
Loading…
Reference in New Issue