Commit Graph

23 Commits

Author SHA1 Message Date
William Casarin
6545e1ddee thread: ensure thread unknowns are handled 2024-11-18 17:28:55 -08:00
William Casarin
a678e647a4 hide media on universe view
Also fixes textmode

Fixes: https://github.com/damus-io/notedeck/issues/443
2024-11-17 16:45:28 -08:00
kernelkind
2d7da83872 rename TimelineResponse -> ColumnNoteResponse
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-15 12:35:06 -04:00
kernelkind
0a077ae797 fix unnecessary copy every frame
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-15 11:45:13 -04:00
kernelkind
dcb6620ddd proper timelineTabs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 17:39:10 -04:00
kernelkind
780fba3093 generify Threads
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 13:29:31 -04:00
kernelkind
d11d8aa9d0 consolidate timelineTab ui to TimelineTabView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-14 10:58:43 -04:00
kernelkind
34aef30fed click on thread pfp
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-10-11 17:58:29 -04:00
William Casarin
2dba41186d context: move note context button to its own file
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 10:51:08 -07:00
William Casarin
a9cb734ef6 refactor: make options_button a NoteOptions
No reason why this needs to be a standalone bool

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 09:32:21 -07:00
William Casarin
1a94c21d96 refactor: remove processs_note_selection
Moved this to NoteOptionSelection::process

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-26 09:22:05 -07:00
kernelkind
6f5f090fbe Add 'more options' to each note
Signed-off-by: kernelkind <kernelkind@gmail.com>
2024-09-19 19:04:28 -04:00
William Casarin
36c0971fd9 Flexible routing
Another massive refactor to change the way routing works. Now any
column can route anywhere.

Also things are generally just much better and more modular via the
new struct split borrowing technique.

I didn't even try to split this into smaller commits for my sanity.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-16 14:50:20 -07:00
William Casarin
00091c5088 Switch to Columns
Also refactor damus app usage to only pass in things that we need in views.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-11 15:49:34 -07:00
William Casarin
2603d08d1a tidy: fix formatting
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-02 18:31:53 -07:00
William Casarin
4c61c337bd fix transaction crash regression when opening thread
small oversight

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-02 18:12:12 -07:00
William Casarin
bc8a8d4a74 perf: coordinate unknown id lookups
This is a huge improvement over what it was before. Now all unknown id
lookups are debounced and happen through a central coordinator. This
ensures there is no duplication between timelines.

Fixes: https://github.com/damus-io/notedeck/issues/279
Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-02 17:38:18 -07:00
William Casarin
ad244d48c0 fetch contact lists
If we don't have a contact list, make sure to fetch one

Signed-off-by: William Casarin <jb55@jb55.com>
2024-09-02 16:22:29 -07:00
William Casarin
c3fc4e09e8 thread: fix ordering and duplication bugs
Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-31 13:55:06 -07:00
William Casarin
dd9f41b04a threads: ensure we always handle bar results
We were not handling it in ThreadView, now we do.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-31 13:51:24 -07:00
William Casarin
593df9145b threads: check for new notes locally when thread is re-opened
We have a NoteRef cache for threads in memory, which is just a list of
NoteKeys and timestamps.

When reopening a thread, query the local DB to see if there are any new
notes that we might have missed because we weren't actively subscribed
to them.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-31 13:51:24 -07:00
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
33e5b6886b threads: add initial thread support
This is a really dumb and broken version of threads, but it will be our
foundation for future changes.

All it currently does is load whatever notes we have locally for a
thread in chronological order. It currently does not open any
subscriptions. It is not clear what is replying to what, but hey, its a
start.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-07-31 13:51:24 -07:00