fix: wire mark-as-read in timeline view

Items in the cross-channel timeline now carry per-item channel UID so
the mark-read API call can target the correct channel. Adds the same
dismiss animation used in the channel view.
This commit is contained in:
Ricardo
2026-02-27 11:22:44 +01:00
parent 6269c7ac98
commit 8a971111c1
3 changed files with 59 additions and 2 deletions

View File

@@ -1184,10 +1184,10 @@ export async function timeline(request, response) {
// Get channels with colors for filtering UI and item decoration
const channelList = await getChannelsWithColors(application, userId);
// Build channel lookup map (ObjectId string -> { name, color })
// Build channel lookup map (ObjectId string -> { name, color, uid })
const channelMap = new Map();
for (const ch of channelList) {
channelMap.set(ch._id.toString(), { name: ch.name, color: ch.color });
channelMap.set(ch._id.toString(), { name: ch.name, color: ch.color, uid: ch.uid });
}
// Parse excluded channel IDs from query params
@@ -1223,6 +1223,7 @@ export async function timeline(request, response) {
if (info) {
item._channelName = info.name;
item._channelColor = info.color;
item._channelUid = info.uid;
}
}
}