Remove unread marker when receiving proper read receipt
This commit is contained in:
@@ -118,6 +118,23 @@ function _MainMessageWidget(p: {
|
|||||||
return n;
|
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 (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user