Skip to content

Commit

Permalink
fix that "Incoming Thing Updates" always repeated the first entry
Browse files Browse the repository at this point in the history
* new entries to the table were not added correctly, but always only the first received entry was added again
  • Loading branch information
thjaeckle committed Feb 13, 2024
1 parent 4a6011b commit 986df09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/modules/things/messagesIncoming.ts
Expand Up @@ -125,14 +125,14 @@ function onSelectThingUpdateMessageContentSelect() {
function onMessage(messageData) {
messages.push(messageData);

const filteredMessage = dom.tableFilterMessagesIncoming.filterItems(messages);
const filteredMessage = dom.tableFilterMessagesIncoming.filterItems([messageData]);

if (filteredMessage.length > 0) {
filteredMessages.push(filteredMessage[0]);
addTableRow(filteredMessage[0]);
}

Utils.updateCounterBadge(dom.badgeMessageIncomingCount, messages, filteredMessage);
Utils.updateCounterBadge(dom.badgeMessageIncomingCount, messages, filteredMessages);
}

function addTableRow(messageData: any) {
Expand Down

0 comments on commit 986df09

Please sign in to comment.