Commit Graph

7 Commits

Author SHA1 Message Date
Jordan Rose
3b8729ea74 Replace enumeration blocks with SDSMappedCursor for unread messages
SDSMappedCursor behaves like the direct fetch cursors synthesized for
SDS types, but performs a compactMap-like transform on each element.
Like SDS cursors, it can throw, and callers are required to handle
that; this uncovered some places where we can do better recovery if an
error ever were to happen.
2022-03-07 15:01:39 -08:00
Jordan Rose
a171697228 Enumerate unread messages instead of returning an array of them
Also, sort them in the database query, so they don't need to be sorted
afterwards. (This is important for existing code that works in
batches.)

We do lose an optimization where the unread messages are counted in a
read query before marked read in a write query. If that's important I
can contrive a way to put it back.
2022-02-11 16:22:32 -08:00
Nora Trapp
f977f292a0 Mark threads as read when archiving 2021-07-09 14:10:44 -07:00
Matthew Chen
1e33561ab8 Fix "missing ThreadAssociatedData" assert. 2021-05-20 21:12:17 -03:00
Matthew Chen
1e9a54306e Fix assert around ThreadAssociatedData. 2021-05-19 19:59:35 -03:00
Nora Trapp
1e40ec144d Add support for group descriptions 2021-05-17 09:58:35 -03:00
Nora Trapp
e439bb619e Move isArchived, isMarkedUnread, and mutedUntilDate off of TSThread 2021-05-13 12:54:33 -07:00