diff options
Diffstat (limited to 'src/feed-cache.js')
| -rw-r--r-- | src/feed-cache.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feed-cache.js b/src/feed-cache.js index a4f3ac9..cf3323e 100644 --- a/src/feed-cache.js +++ b/src/feed-cache.js @@ -54,6 +54,8 @@ export function createFeedCache(storage, prefix, now = Date.now) { return value.notes; } catch { return []; } }, + // a feed's posts as stored, without counting as a read + peekNotes(id) { const v = peek(id); return v && Array.isArray(v.notes) ? v.notes : null; }, save(id, notes) { try { storage.setItem(keyOf(id), JSON.stringify({ at: now(), notes: compact(notes) })); sweep(keyOf(id)); } catch {} }, |
