reader icon indicating copy to clipboard operation
reader copied to clipboard

EntryCounts.unread/unimportant

Open lemon24 opened this issue 3 years ago • 4 comments

https://github.com/lemon24/reader/blob/7c4df8af5cfe9b5282e46c019950366893854c75/src/reader/_app/init.py#L402-L408

Also useful here: https://github.com/dbrennand/Feederbot/issues/16

lemon24 avatar Jul 09 '22 08:07 lemon24

Some 2024 notes:

  1. Now that Entry.important is tri-state (bool or None), .unimportant cannot be a total - important property anymore, it needs to come from the database; "unimportant" means important == False, because that's what mark_entry_as_unimportant() defines it as.
  2. The same fields/properties should be added to EntrySearchCounts.
  3. The avg{1m,3m,1y} properties can be ignored for now, following the work in https://github.com/lemon24/reader/issues/254#issuecomment-1807064610 / this gist / https://github.com/lemon24/reader/issues/306#issuecomment-1694655504 I am relatively convinced the averages API is not powerful enough, and should be deprecated in 4.0.

lemon24 avatar Apr 06 '24 06:04 lemon24

Remaining work: add unread property (I mistitled https://github.com/lemon24/reader/commit/c8678236ec515820458df4cad8790adcf628944b).

lemon24 avatar Jun 23 '24 12:06 lemon24

Remaining work: add unread property (I mistitled c867823).

Looking at this issue - by the latest comment, do you mean adding unread to the src/reader/types.py file?

JCart97 avatar Jul 22 '24 20:07 JCart97

Looking at this issue - by the latest comment, do you mean adding unread to the src/reader/types.py file?

Yup.

lemon24 avatar Jul 22 '24 21:07 lemon24

Hi! I would like to finish this off, however I need a few pointers if that's alright. Should I turn the read property into a tri-state(bool or None) one like the important property, or introduce a new one?

cgkoutzigiannis avatar Sep 12 '25 16:09 cgkoutzigiannis

Hi @cgkoutzigiannis , thank you for looking into this!

(I'll be away for another week, please excuse the delayed responses.)

For unread, a @property returning total minus read should suffice, since there's no plan to make read a tristate (unlike with important, "explicitly marked as unread" is not very useful); also see previous two comments for details.

lemon24 avatar Sep 18 '25 15:09 lemon24