Closed lemon24 closed 3 years ago
OK, thought about this a bit.
These things shouldn't change:
read
and important
should continue to be optimized (compared to tags).The fact that the corresponding tag names can change is an issue. Storage (and Search) must be told out-of-band that "this tag actually means read
, use whatever optimization you have".
Also, because the tag prefix must be configurable, the read
part must be too.
Possible solutions:
read
tags in a special class, e.g. SpecialTag('.reader.read', TagHint.READ)
.
storage.mark_as_read_unread(True, '.reader.read')
.
read
in EntryFilterOptions, and convert them into read= arguments (if possible).Regardless of what we do, it seems pretty clear that none of these is actually making things simpler implementation-wise, and we're just moving the info about read
etc. being special around.
Also, if both the flag and the tag are stored, changing one should always change the other. From this perspective, (1) is likely the best solution, since it models all the required data.
A light version of (2), where Reader (or a plugin) just sets tags for convenience seems like a decent approach if we just want to provide this to end users.
I initially started this whole thing thinking it would help solve #254 (by attaching an "added date" to each tag). But e.g. for read
I'd like to store the date when it was last changed (read/unread); if we use a tag for it, unread means "no read
tag", so we're left with no date (unless we change out model and use 2 tags...).
Closing this at least until #228 is implemented.
Use entry tags for read, important; it may make things simpler.
Pending #228.
Unsolved problem: How does storage know to cache .reader.read? (the tag name can change based on Reader.reserved_name_scheme)