Addresses ([#140])
I don't think the zoom code in handle_key_events was necessary because
gui zooming already appears to be handled by egui::gui_zoom.
Description of keybindings:
59d71831fd/crates/egui/src/gui_zoom.rs (L5-L26)
Zooming using the described keybindings works fine with a textedit
focused.
This PR removes the ContextAction::SetPixelsPerPoint aggressively;
maybe it should remain for other future uses?
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>
is_mobile doesn't really make sense for android tablets. We were
overloading this variable to mean "is_narrow". What we really want is
is_oled for mobile devices and is_narrow for if its phone-like.
Signed-off-by: William Casarin <jb55@jb55.com>
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>
This implements initial local contact queries. For testing you can
create contact list columns via:
Examples
--------
Make a contacts column from a specific npub:
$ notedeck --column contacts:npub...
Use the current user's contacts:
$ notedeck --column contacts --pub npub...
We also introduce a new ColumnKind enum which is used to describe the
column type.
Signed-off-by: William Casarin <jb55@jb55.com>
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>
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>