Remove unread marker when receiving proper read receipt

This commit is contained in:
2025-12-01 10:25:14 +01:00
parent b93100413c
commit 196671d0fb

View File

@@ -118,6 +118,23 @@ function _MainMessageWidget(p: {
return n;
});
}
// Remove unread message on left sidebar
if (
m.type === "ReceiptEvent" &&
m.receipts.find((r) => r.user === user.info.matrix_user_id) !== undefined
) {
p.onRoomsListUpdate((r) => {
const n = [...r];
const idx = r.findIndex((el) => el.id === m.room_id);
if (idx)
n[idx] = {
...n[idx],
number_unread_messages: 0,
};
return n;
});
}
};
return (