Trying more
This commit is contained in:
@@ -231,6 +231,11 @@ namespace Swarmops.Frontend.Socket
|
||||
malfunctionsArray.Add(malfunctionObject);
|
||||
}
|
||||
|
||||
if (++_malfunctionTestCounter > 4)
|
||||
{
|
||||
_malfunctionTestCounter = 0;
|
||||
}
|
||||
|
||||
JObject data2 = new JObject();
|
||||
data2["MessageType"] = "Malfunctions";
|
||||
data2["MalfunctionsList"] = malfunctionsArray.ToString();
|
||||
|
||||
@@ -86,9 +86,11 @@ function updateListBox(box, listData) {
|
||||
// Step 1: Iterate through list, build id array
|
||||
|
||||
var idListLookup = {};
|
||||
listData.forEach(function(item, index) {
|
||||
idListLookup[item.id] = item;
|
||||
});
|
||||
if (listData.length > 0) {
|
||||
listData.forEach(function(item, index) {
|
||||
idListLookup[item.id] = item;
|
||||
});
|
||||
}
|
||||
|
||||
// Step 2: Iterate through box, change texts of matching ids,
|
||||
// remove items that aren't in list, build id array
|
||||
|
||||
Reference in New Issue
Block a user