Commit Graph

12 Commits

Author SHA1 Message Date
kernelkind
0344ea866f fix(notif-indicator): more performant impl
the previous unseen notification indicator only ran once a few
seconds, but when it did it often took > 5ms because of ndb::query,
which is unacceptable.

This commit removes the ndb::query entirely and relies on the
ndb::poll_for_notes which is already being used every time there is
a new event from a relay

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-19 19:50:53 -04:00
kernelkind
e0ed122951 use NdbQueryPackage to call ndb::query multiple times
necessary to ensure we can retrieve reposts from ndb

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:56:19 -04:00
kernelkind
78504a6673 use TimelineUnits instead of Vec<NoteRef>
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:56:56 -04:00
kernelkind
b421e7e45f make TimelineCache::notes private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:20 -04:00
kernelkind
8697a5cb0a set fresh from TimelineCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-31 19:07:28 -04:00
William Casarin
a4c1b38116 introduce HybridFilter
This introduces a new filter construct called HybridFilter. This allows
filters to have different remote filter than local ones. For example,
adding kind0 to the remote for keeping profiles up to date on your
timeline, but only subscribing to kind1 locally.

Only home/contact filters use this feature for now.

Fixes: https://github.com/damus-io/notedeck/issues/995
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
kernelkind
cc92fc2082 make TimelineCache::timelines private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:07 -04:00
kernelkind
dc4e3d7510 increment sub count when necessary
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:04 -04:00
kernelkind
95e9e4326a add TimelineCache helper methods
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:00 -04:00
kernelkind
6544d43d02 replace MultiSubscriber with TimelineSub
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:12:46 -04:00
William Casarin
0cc1d8a600 Switch to unified timeline cache via TimelineKinds
This is a fairly large rewrite which unifies our threads, timelines and
profiles. Now all timelines have a MultiSubscriber, and can be added
and removed to columns just like Threads and Profiles.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-05 18:30:45 -08:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00