fix(reading-progress): load and display progress on fresh sessions; include external URL keys and avoid double-encoding; add debug guard

This commit is contained in:
Gigi
2025-10-22 02:02:39 +02:00
parent 0bc84e7c6c
commit a02413a7cb
4 changed files with 22 additions and 11 deletions

View File

@@ -276,10 +276,10 @@ class ReadingProgressController {
// Process new events
processReadingProgress(events, readsMap)
// Convert back to progress map (naddr -> progress)
// Convert back to progress map (id -> progress). Include both articles and external URLs.
const newProgressMap = new Map<string, number>()
for (const [id, item] of readsMap.entries()) {
if (item.readingProgress !== undefined && item.type === 'article') {
if (item.readingProgress !== undefined) {
newProgressMap.set(id, item.readingProgress)
}
}