From PR description:
See the test_basic() test in linux_key_storage.rs. I ran it successfully
on my MacOS machine and a linux VM. The BasicFileStorage impl just
stores each Keypair as a SerializableKeypair json object with the file
name as the public key hex in ~/.notedeck_credentials. The
SerializableKeypair uses the nip49 EncryptedSecretKey, but we just use
an empty string as the password for now.
The BasicFileStorage impl works in MacOS, but it only conditionally
compiles to linux for simplicity.
pub enum KeyStorageResponse<R> {
Waiting,
ReceivedResult(Result<R, KeyStorageError>),
}
This is used as a response so that it's possible for the storage impl to
be async, since secret_service is async. It seems that secret_service
would allow for a more robust linux key storage impl so I went ahead and
made the API compatible with an async impl.
* kernelkind (1):
impl linux credential storage
Also fix a few nav clipping bugs
From egui-nav:
William Casarin (5):
add forward nav support
fix body overlapping header
fix transition clipping when in a smaller container
fix forward nav clipping in small containers
fix background layer having the wrong UI id
Signed-off-by: William Casarin <jb55@jb55.com>
Calling egui_virtual_list's `items_inserted_at_start` is incorrect if we
insert notes inbetween other notes in the timeline. To prevent our list
getting confused, let's handle this case explicitly by calling 'reset'
when we splice notes in.
Ideally we would update egui_virtual_list to handle spliced-in items,
but we will leave that to a future update.
If our limit says we're ok with many more notes than we have, then don't
since-optimize, otherwise we may be missing notes. This results in a
Changelog-Changed: Don't since-optimize if we don't have enough notes
Signed-off-by: William Casarin <jb55@jb55.com>
we need to pass a few more things around but it's not that bad. This
will allow you to launch damus with --mobile for mobile testing without
recompilation.
We should be treating all ui widgets as pure functions that do not
mutate anything. This will make testing easier, as well as avoiding
shared mutable references.
Signed-off-by: William Casarin <jb55@jb55.com>
I noticed the responses are a bit slow without this. Local query limits
are not capped.
Fixes: https://github.com/damus-io/notedeck/issues/98
Changelog-Changed: Restrict remote filter sizes to 250 (for now)
Signed-off-by: William Casarin <jb55@jb55.com>
TimelineView is a filtered view of a timeline. We will use this for
future tab rendering. We also introduce a new "selection" concept for
selecting notes on different timeline views. This is in preparation for
vim keybindings.
Calling key_pressed invokes a filter over the entire event list every
time, this is much more efficient, which is important when we are
handling many key events.