Commit Graph

457 Commits

Author SHA1 Message Date
Terry Yiu
bf58fdce1f Internationalize ShowNoteClientOptions labels
Changelog-Fixed: Internationalize ShowNoteClientOptions labels
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-28 16:38:01 -04:00
Terry Yiu
419102959f Add human-readable names to locales in settings
Changelog-Added: Added human-readable names to locales in settings
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-28 16:38:01 -04:00
William Casarin
2524ff1061 wallet: fix nwc copy/paste
Fixes: https://github.com/damus-io/notedeck/issues/1012
Changelog-Fixed: Fix NWC copy/paste
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-25 12:09:15 -07:00
William Casarin
eb0ab75e87 ui/wallet: small refactor to use return instead of break
we don't need this weird break syntax when we're in a closure

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-25 12:04:38 -07:00
William Casarin
009b4cf6b0 images: always resize large images
Fixes: https://github.com/damus-io/notedeck/issues/451
Fixes: https://linear.app/damus/issue/DECK-556/resize-images-to-device-screen-size
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-25 10:52:27 -07:00
kernelkind
2bd139ef9e use DragSwitch to allow dragging anywhere in navigation
instead of just the top header when there is a vertical scroll

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:54:36 -04:00
kernelkind
cda0a68854 add route_uses_frame
need to know this to get the correct drag id

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:54:32 -04:00
kernelkind
a555707f67 get scroll id for Route
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:54:11 -04:00
kernelkind
1601914b8b use DragSwitch in Column
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:43 -04:00
kernelkind
aac0f54991 add DragSwitch
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:40 -04:00
kernelkind
8960b3f052 add scroll_id for all views with vertical scroll
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:35 -04:00
kernelkind
6db6cf7b7a enforce scroll_id for ThreadView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:28 -04:00
kernelkind
0bc32272d2 refactor scrolling for post, reply & quote views
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:25 -04:00
William Casarin
7a83483758 nip10: switch to NoteReply instead of handrolled logic
Cc: kernelkind
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 13:32:19 -07:00
William Casarin
db6103d448 router: fix router selection
Many times we get the router selection wrong. This fixes that

Changelog-Fixed: Fix some routing issues when routing from the Chrome
Fixes: https://github.com/damus-io/notedeck/issues/1024
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 12:11:19 -07:00
William Casarin
f9f8b3fe1b Merge remote-tracking branch 'github/pr/1023' 2025-07-23 12:31:51 -07:00
William Casarin
5ddd8660a3 settings: fix route to relay
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 12:29:09 -07:00
William Casarin
fe30704496 Merge remote-tracking branch 'fernando/feat/settings-view' 2025-07-23 12:00:29 -07:00
William Casarin
ff0428550b fix missing zap button
Changelog-Fixed: Fix missing zap button
Fixes: 397bfce817 ("add `Accounts` to `NoteContext`")
Fixes: https://github.com/damus-io/notedeck/issues/1021
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 11:49:03 -07:00
Fernando López Guevara
da6ede5f69 feat(settings): add settings view 2025-07-23 15:33:17 -03:00
William Casarin
ebf31abafa wallet: remove unused flag in note context
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 09:36:38 -07:00
William Casarin
f722a58d66 Merge new Accounts button to chrome sidebar by kernel #994
kernelkind (3):
      use saturating sub
      add new Accounts button to chrome sidebar
      add ChromePanelAction::Profile & use for pfp
2025-07-23 09:13:49 -07:00
William Casarin
ffcd38ef96 Merge prevent crash when switching cols from fernando #997
Fernando López Guevara (1):
      fix(columns): prevent crash when switching to account with no columns
2025-07-23 09:10:21 -07:00
William Casarin
10eedc0ca6 Merge contact list fixes by kernel #998
kernelkind (2):
      appease clippy
      fix: sometimes most recent contacts list wasn't used
2025-07-23 08:54:12 -07:00
William Casarin
c27aff6bec debug: add startup query debug log
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:02:29 -07:00
William Casarin
3d4db820b4 i18n: make localization context non-global
- Simplify Localization{Context,Manager} to just Localization
- Fixed a bunch of lifetime issueo
- Removed all Arcs and Locks
- Removed globals
  * widgets now need access to &mut Localization for i18n

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 09:49:32 -07:00
Terry Yiu
3f5036bd32 Internationalize user-facing strings and export them for translations
Changelog-Added: Internationalized user-facing strings and exported them for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:45:29 -07:00
William Casarin
38b2077a8d Merge kernel's "can't remove damoose fixes" and more! #1001
kernelkind (9):
      appease clippy
      use `NwcError` instead of nwc::Error
      make `UserAccount` cloneable
      allow removal of Damoose account
      expose `AccountCache::falback`
      move select account logic to own method
      bugfix: properly sub to new selected acc after removal of selected
      bugfix: unsubscribe from timelines on deck deletion
      bugfix: unsubscribe all decks when log out account
2025-07-20 17:17:29 -07:00
William Casarin
28065ec4a3 fix one missing home string
Fixes: f39d554c96 ("rename Contacts to Home")
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-20 16:54:31 -07:00
kernelkind
0b27282985 bugfix: unsubscribe all decks when log out account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 21:39:58 -04:00
kernelkind
1c547bbcaa bugfix: unsubscribe from timelines on deck deletion
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 21:25:09 -04:00
kernelkind
d4082eb818 bugfix: properly sub to new selected acc after removal of selected
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 20:31:36 -04:00
kernelkind
d22dd9ed31 appease clippy
```
error: large size difference between variants
   --> crates/notedeck_columns/src/column.rs:249:1
    |
249 | / pub enum IntermediaryRoute {
250 | |     Timeline(Timeline),
    | |     ------------------ the largest variant contains at least 280 bytes
251 | |     Route(Route),
    | |     ------------ the second-largest variant contains at least 72 bytes
252 | | }
    | |_^ the entire enum is at least 280 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
250 -     Timeline(Timeline),
250 +     Timeline(Box<Timeline>),
    |

error: could not compile `notedeck_columns` (lib) due to 1 previous error
```

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:01:46 -04:00
kernelkind
fdef74c353 fix: sometimes most recent contacts list wasn't used
`ndb::poll_for_notes` appears to give notes as they arrive. We
need to make sure we only use the most recent for contacts

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 18:17:56 -04:00
kernelkind
030e4226f8 appease clippy
```
error: large size difference between variants
   --> crates/notedeck_columns/src/column.rs:249:1
    |
249 | / pub enum IntermediaryRoute {
250 | |     Timeline(Timeline),
    | |     ------------------ the largest variant contains at least 280 bytes
251 | |     Route(Route),
    | |     ------------ the second-largest variant contains at least 72 bytes
252 | | }
    | |_^ the entire enum is at least 280 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
250 -     Timeline(Timeline),
250 +     Timeline(Box<Timeline>),
    |

error: could not compile `notedeck_columns` (lib) due to 1 previous error
```

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 18:17:53 -04:00
Fernando López Guevara
508d8dc0ba fix(columns): prevent crash when switching to account with no columns 2025-07-17 19:09:10 -03:00
William Casarin
c421f8f8ff profile: fetch new metadata when visiting profiles
This ensures we always have the latest data

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:49:16 -07:00
William Casarin
8d2da86f1f enostr: remove raw event type
we rely on the event type for multicast logic,
so remove raw since its not really needed anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:20:33 -07:00
William Casarin
8a1398face clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
William Casarin
a4c1b38116 introduce HybridFilter
This introduces a new filter construct called HybridFilter. This allows
filters to have different remote filter than local ones. For example,
adding kind0 to the remote for keeping profiles up to date on your
timeline, but only subscribing to kind1 locally.

Only home/contact filters use this feature for now.

Fixes: https://github.com/damus-io/notedeck/issues/995
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
kernelkind
a31fdd3ed2 use saturating sub
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 15:23:15 -04:00
William Casarin
1a7154fab6 reply: add some space after reply box
we need more room on mobile

Fixes: https://github.com/damus-io/notedeck/issues/991
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 11:02:59 -07:00
William Casarin
51d2b4414b ui/note: refactor reply line into a function
this is a bit neater

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 09:37:20 -07:00
William Casarin
c0c2120f74 android: fix back button
Fixes: https://github.com/damus-io/notedeck/issues/972
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 09:18:34 -07:00
William Casarin
a603685fac multi_subscriber: switch to debug statements
info is not really the right level for this
2025-07-16 16:36:26 -07:00
kernelkind
5168d50257 add info statements
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:09 -04:00
kernelkind
cc92fc2082 make TimelineCache::timelines private
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:07 -04:00
kernelkind
dc4e3d7510 increment sub count when necessary
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:04 -04:00
kernelkind
95e9e4326a add TimelineCache helper methods
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:13:00 -04:00
kernelkind
4db6f37017 track all timeline related subscriptions in TimelineSub
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-16 18:12:58 -04:00