Commit Graph
58 Commits
Author SHA1 Message Date
Ken Sedgwick 84e0546e69 improve relay message parsing unit tests 2025-02-20 12:57:26 -08:00
Ken Sedgwick d39b2706e0 add diagnostic string to DecodeFailed 2025-02-20 11:54:04 -08:00
Ken Sedgwick 091c638eb1 move RelayDebugView to notedeck crate and restore --relay-debug 2025-02-06 12:25:37 -08:00
Ken Sedgwick 480f98eda4 panic on unknown CLI arguments
Currently silently ignores which is not helpful ...
2025-02-06 12:25:31 -08:00
Ken Sedgwick 201cfb2db1 add derive Debug to some things 2025-02-06 10:32:50 -08:00
Ken Sedgwick 2ddc53faa5 drive-by clippy fixes 2025-02-06 10:32:49 -08:00
Ken Sedgwick 345324a2f6 drive-by compiler warning fixes 2025-02-06 10:32:49 -08:00
Ken Sedgwick 482313f883 add relay hints to Mention::{Profile,Event} and UnknownIds 2025-02-06 10:08:01 -08:00
Ken Sedgwick f0588a7f6b drive-by compiler warning fixes 2025-02-06 10:08:00 -08:00
Ken Sedgwick 38da6c9eaf explicitly activate and deactivate account muted list subs
This is the same treatment to muted as applied to relay lists in #678
2025-02-06 10:02:06 -08:00
Ken Sedgwick 9ce4c2891e explicitly activate and deactivate account relay list subs
- ensures only one active at a time
- stops leaking relay list subs
2025-02-06 10:02:05 -08:00
Ken Sedgwick 2fcfed4dd5 improve debug logging, comments, and variable names for clarity 2025-02-06 10:02:04 -08:00
Ken Sedgwick e8c0b903a8 drive-by compiler warning fixes 2025-02-06 10:02:04 -08:00
Ken Sedgwick 1e0801f54b additional account relay list improvements
- Use the current selected account only to determine desired
  relays. Previously the desired relay list was determined from the
  union of all accounts.
- Update the relay configuration immediately when the user switches accounts.
- Delete relays from the account (instead of the relay pool
  directly). This results in the relay being removed in the pool as
  well, but is persisted correctly.
2025-01-23 16:07:49 -08:00
Ken Sedgwick 94a1d78114 publish NIP-65 relay lists 2025-01-22 15:16:08 -08:00
Ken Sedgwick 3278d3ba16 upgrade url string to RelaySpec for [read|write] markers
I think RelaySpec wants to move to enostr so the RelayPool can support
read and write relays ...
2025-01-22 12:43:05 -08:00
Ken Sedgwick fe3e2dad14 add Accounts::add_advertised_relay 2025-01-21 16:03:44 -08:00
Ken Sedgwick e436be400e add add relay GUI 2025-01-21 12:21:13 -08:00
Ken Sedgwick 366ca24ac1 drive-by clippy fixes 2025-01-21 10:18:37 -08:00
Ken Sedgwick e193e00539 Mute rendering instead of ingress
Previous approach was to keep muted content from getting inserted.

Instead, this version alters it's display.  This makes toggling mutes
on and off externally much more stable (the display changes but we
don't have to rebuild content trees)

For now muted content is collapsed to a red "Muted" tombstone w/ a reason.
2025-01-02 15:21:14 -08:00
Ken Sedgwick 2d7de8fdc0 Add debug-widget-callstack and debug-interactive-widgets features
- they need to be separate, both on at once is too much

    --features debug-widget-callstack
      Show callstack for the current widget on hover if all modifier keys
      are pressed down

    --features debug-interactive-widgets
      Show an overlay on all interactive widgets

    Notes:
    - debug-widget-callstack asserts `egui:callstack` feature when enabled
    - Only works in debug builds, compile error w/ release builds
2025-01-02 14:14:29 -08:00
Ken SedgwickandWilliam Casarin 0c29c89909 need mutable ndb reference to unsubscribe
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:57:06 -08:00
Ken SedgwickandWilliam Casarin 926a3f80f4 ndb.get_notekey_by_id now returns NoteKey
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:57:04 -08:00
Ken SedgwickandWilliam Casarin e1a55c6532 update nostrdb-rs for async stream support
Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:56:48 -08:00
Ken SedgwickandWilliam Casarin 7da98b3c5c fix android build with cargo update num_enum@0.7.3
Compiling num_enum v0.7.3
error[E0463]: can't find crate for `num_enum_derive`

Closes: https://github.com/damus-io/notedeck/pull/584
2024-12-17 08:56:45 -08:00
Ken SedgwickandWilliam Casarin 553a88d574 android: use more app top margin for android
A more refined solution would query the android environment for the
system bar height ...

Closes: https://github.com/damus-io/notedeck/pull/585
Reviewed-by: William Casarin <jb55@jb55.com>
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-17 08:52:39 -08:00
Ken SedgwickandWilliam Casarin 8b80096290 android: misc fixes for android
Closes: https://github.com/damus-io/notedeck/pull/568
Signed-off-by: William Casarin <jb55@jb55.com>
2024-12-13 08:19:39 -08:00
Ken Sedgwick 35138cd951 android: update to winit 0.30.5 2024-12-09 10:40:04 -08:00
Ken Sedgwick 66dbbf7c03 egui: update deprecated calls to use UiBuilder instead 2024-12-09 10:39:35 -08:00
Ken Sedgwick e31ce5d879 android: Undo the workspace stuff because android builds don't like 2024-12-09 10:39:00 -08:00
Ken Sedgwick aafddf5acb debug: add crate features which enable egui DebugOptions
--features debug-widget-callstack
  Show callstack for the current widget on hover if all modifier keys
  are pressed down

--features debug-interactive-widgets
  Show an overlay on all interactive widgets

Notes:
- debug-widget-callstack asserts `egui:callstack` feature when enabled
- Only works in debug builds, compile error w/ release builds
2024-12-03 09:09:02 -08:00
Ken Sedgwick 84838478b3 Skip muted content 2024-12-02 13:14:54 -08:00
Ken Sedgwick d595631966 Add user mute list sync via polling 2024-12-02 13:14:53 -08:00
Ken Sedgwick f00a67ab2c Update user relay-list via polling 2024-12-02 13:14:50 -08:00
Ken Sedgwick fb187293e1 update to github v4 artifact actions 2024-11-26 13:28:58 -08:00
Ken Sedgwick bfcfbd661d Add debian packaging 2024-11-26 13:01:05 -08:00
Ken SedgwickandGitHub 50f38b00a8 Merge pull request #480 from ksedgwic/2024-11-generate-rpm
Generate RPM package
2024-11-26 15:00:06 -06:00
Ken Sedgwick ad52775822 Generate RPM package 2024-11-25 15:25:56 -08:00
Ken Sedgwick 877a30d2f6 Enable file_key_storage on Android 2024-11-11 10:14:42 -08:00
Ken SedgwickandGitHub 050c6e39de Merge pull request #389 from ksedgwic/2024-10-fix-rust-log-env
Restore RUST_LOG filtering, default to INFO if absent
2024-11-07 14:35:12 -06:00
Ken Sedgwick ae4b7750cc Restore RUST_LOG filtering, default to INFO if absent 2024-10-30 10:39:51 -07:00
Ken Sedgwick 570d64c3cd canonicalize relay urls to avoid false duplicates 2024-10-29 13:42:29 -07:00
Ken Sedgwick e166dc17ef Skip adding relays that are already in the pool 2024-10-29 13:42:28 -07:00
Ken Sedgwick 26cb1a2c07 Fix parsing of subscription id for RelayMessage::Event 2024-10-29 13:42:28 -07:00
Ken Sedgwick 76df286837 add .rustfmt.toml to specify edition 2024-10-29 13:42:27 -07:00
Ken Sedgwick 2baf9dfed0 build: Cargo.lock updates to mitigate num_enum_derive problem 2024-10-29 13:42:26 -07:00
Ken Sedgwick a17b2dcb17 Untangle zoom when in TextEdit
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:
https://github.com/emilk/egui/blob/59d71831fd43139bf9b427b779a241099b9c9826/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?
2024-09-27 12:44:42 -07:00
Ken SedgwickandWilliam Casarin 21298b43f5 hitbox: cache note size instead of rect 2024-09-26 12:52:12 -07:00
Ken SedgwickandWilliam Casarin c25fde4a06 hitbox: handle hits on quoted notes correctly 2024-09-26 12:51:33 -07:00
Ken SedgwickandWilliam Casarin 5b7c9c9234 hitbox: extend the hitbox to the full width of the container 2024-09-26 12:42:57 -07:00
Ken SedgwickandWilliam Casarin 1f64350197 hitbox: more naming cleanup 2024-09-26 12:42:35 -07:00
Ken SedgwickandWilliam Casarin 35e8e536e6 debug: implemented fmt::Debug for NoteId 2024-09-26 12:42:35 -07:00
Ken SedgwickandWilliam Casarin f00b301e88 debug: implemented fmt::Debug for Pubkey 2024-09-26 12:42:35 -07:00
Ken Sedgwick fea315cb99 add note underbutton to detect clicks and open thread 2024-09-17 11:49:51 -07:00
Ken Sedgwick e7f959b3ea Read android args from config file on device
- allows use of more interesting args w/o risk of checking them in by mistake
- allows use of different args w/o rebuilding the app
- uses compiled in defaults if config file missing or broken

Example android-config.json:
```
{
  "args": [
    "--npub",
    "npub1h50pnxqw9jg7dhr906fvy4mze2yzawf895jhnc3p7qmljdugm6gsrurqev",
    "-c",
    "contacts",
    "-c",
    "notifications"
  ]
}
```

Install/update android-config.json with:
```
adb push android-config.json /sdcard/Android/data/com.damus.app/files/android-config.json
```

Using internal storage would be better but it seems hard to get the config file onto
the device ...
2024-09-10 14:16:10 -07:00
Ken Sedgwick 55f6a94c18 Supply default timeline for mobile app if empty
Fixes ([#284])
2024-09-03 11:37:27 -07:00
Ken SedgwickandWilliam Casarin fe7580f5be Extend ImageCache to handle content images 2024-09-02 17:54:49 -07:00
Ken SedgwickandWilliam Casarin 085c6f1992 build: updated num_enum to get around build problem
Problem:
```
error[E0463]: can't find crate for num_enum_derive
  --> /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num_enum-0.7.2/src/lib.rs:10:11
   |
10 | pub use ::num_enum_derive::{
   |           ^^^^^^^^^^^^^^^ can't find crate
```
2024-09-02 17:54:49 -07:00