Remembers in localStorage which dumps and playlists this browser has opened, for the unread dot on the dump and playlist cards.

Functions

f
isDumpVisited(id: string): boolean

Checks whether dump id was opened in this browser.

f
isPlaylistVisited(id: string): boolean

Checks whether playlist id was opened in this browser.

f
isRecent(createdAt: Date): boolean

Checks whether createdAt is less than 7 days old. Older items show no unread dot, since an old item not opened here isn't news.

f
markDumpVisited(id: string): void

Records dump id as opened. Nothing re-renders, so a card already on screen keeps its dot until it renders again.

f
markPlaylistVisited(id: string): void

Records playlist id as opened, as markDumpVisited does a dump.