Commit Graph

3 Commits

Author SHA1 Message Date
William Casarin
a28db5d330 local thread subscriptions
This adds local nostrdb thread subscriptions. When navigating to a
thread, we first check to see if we have any active nostrdb
subscriptions for that thread. If not, we create a new subscription. If
we do, we re-use that subscription.

This works by storing thread state in the Threads struct in the Damus
application state.

When we pop a route, we check to see if its a thread route. If it is,
then we try to unsubscribe, but only if that is the last remaining
subscriber for that thread, as there could be more than one.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-31 13:51:24 -07:00
William Casarin
86f87fa0a5 noteref: move to note.rs
This doesn't need to be in timeline

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-16 12:51:30 -07:00
William Casarin
307b8af8f1 enostr: rename Event to Note
we will likely replace Note with nostrdb::Note in the future,
this just helps with that transition

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-01 06:38:08 -07:00