Commit Graph

103 Commits

Author SHA1 Message Date
William Casarin
a8c6baeacb make clippy happy 2025-07-31 11:55:39 -07:00
Fernando López Guevara
9ff5753bca settings: use timed serializer, handle zoom properly, use custom text style for note body font size, added font size slider, added preview note 2025-07-29 21:43:26 -03:00
Fernando López Guevara
f2153f53dc feat(settings): allow sorting thread replies newest first 2025-07-29 21:30:35 -03:00
Fernando López Guevara
0dcf70bc15 feat(settings): persist settings to storage 2025-07-29 21:02:18 -03:00
Fernando López Guevara
b8207106d7 feat(settings): persist settings to storage 2025-07-29 11:41:06 -07:00
William Casarin
51f7744149 media/viewer: fullscreen transition animations
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-28 16:12:29 -07:00
William Casarin
3d18db8fd2 Fullscreen MediaViewer refactor
- Moved media related logic into notedeck instead of the ui crate,
  since they pertain to Images/ImageCache based systems

- Made RenderableMedia owned to make it less of a nightmware
  to work with and the perf should be negligible

- Added a ImageMetadata cache to Images. This is referenced
  whenever we encounter an image so we don't have to
  redo the work all of the time

- Relpaced our ad-hoc, hand(vibe?)-coded panning and zoom logic
  with the Scene widget, which is explicitly designed for
  this use case

- Extracted and detangle fullscreen media rendering from inside of note
  rendering.  We instead let the application decide what action they
  want to perform when note media is clicked on.

- We add an on_view_media action to MediaAction for the application to
  handle. The Columns app uses this toggle a FullscreenMedia app
  option bits whenever we get a MediaAction::ViewMedis(urls).

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-28 08:57:57 -07: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
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
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
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
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
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
William Casarin
a517bc69bc Merge is_following fixes from kernel
kernelkind (4):
      add `Accounts` to `NoteContext`
      remove `MuteFun` prop
      make `Contacts::is_following` use bytes instead of `Pubkey`
      migrate to check following through `Contacts::is_following`
2025-07-16 08:50:58 -07:00
William Casarin
ac22fc7072 columns: enable toolbar scroll to top
Fixes: https://github.com/damus-io/notedeck/issues/969
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 13:30:40 -07:00
William Casarin
baff14bbf0 ui/column: include pfp in back response
We were missing the pfp in the back response

Fixes: https://github.com/damus-io/notedeck/issues/923
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 10:51:02 -07:00
William Casarin
0cc64da1ca columns/profile: only mutate profile state after navigating
The code currently mutates the profile state during nav rendering,
which screws up profile state updates. This syncs ProfileStates
in the ui. before it was getting out of sync.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 10:15:21 -07:00
William Casarin
f2adb949f6 columns/nav: ocd nevernest
no behavior changed

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 09:29:34 -07:00
William Casarin
6f266fc91d columns/profile: rename process -> process_profile_action
lets start clarifying these names for easier searching

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 09:28:41 -07:00
William Casarin
443d356cc7 ui/column: remove move/remove column buttons on narrow
It doesn't make sense to move columns in narrow mode

Fixes: https://github.com/damus-io/notedeck/issues/960
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 08:35:07 -07:00
William Casarin
a714bef690 ui/profile: fix dubious profile editing
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-15 08:28:37 -07:00
kernelkind
a7f5319fde remove MuteFun prop
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-14 21:34:05 -04:00
kernelkind
397bfce817 add Accounts to NoteContext
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-14 21:34:02 -04:00
William Casarin
44edffc596 android/input: add copy/paste context to post input
Fixes: https://github.com/damus-io/notedeck/issues/942
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-11 15:36:56 -07:00
William Casarin
e8444f10b3 Revert "Unify sub for contacts in accounts & timeline"
Since its causing contact timelines to not load

eg: ./target/release/notedeck --datapath new3 -c contacts

This reverts commit 9940537897.
2025-07-11 13:49:47 -07:00
William Casarin
96cb5e26ce Merge follow/unfollow from kernel
Jakub Gladysz (1):
      ui: add follow button

kernelkind (14):
      bump nostrdb
      move polling responsibility to `AccountData`
      `AccountData`: decouple query from constructor
      add constructor for `AccountData`
      add `Contacts`
      use `Contacts` in `AccountData`
      expose `AccountSubs`
      Unify sub for contacts in accounts & timeline
      move `styled_button_toggleable` to notedeck_ui
      construct NoteBuilder from existing note
      send kind 3 event
      add actions for follow/unfollow
      add UI for (un)follow
      send contact list event on account creation
2025-07-11 13:06:24 -07:00
William Casarin
217c1e5223 columns/decks: add home and notifications for new accounts
This is way more user friendly, and needed on mobile

Fixes: https://github.com/damus-io/notedeck/issues/937
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-10 17:16:30 -07:00
kernelkind
dca9d3eeab send contact list event on account creation
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-10 13:47:32 -04:00
kernelkind
a883ac8c34 add actions for follow/unfollow
Signed-off-by: kernelkind <kernelkind@gmail.com>
Co-authored-by: Jakub Gladysz <jakub.gladysz@protonmail.com>
Co-authored-by: William Casarin <jb55@jb55.com>
2025-07-10 13:47:28 -04:00
kernelkind
9940537897 Unify sub for contacts in accounts & timeline
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-10 13:47:07 -04:00
kernelkind
c99b99ed52 AccountData: decouple query from constructor
the ndb query must be as close to the subscription as possible to
avoid events falling through the cracks

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-10 13:45:20 -04:00
kernelkind
b41f4c3359 decouple RelayView UI from state mutation
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 15:46:09 -04:00
kernelkind
a73596df48 Clarify & enforce selected-only behavior in Accounts subscription
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 15:46:01 -04:00
kernelkind
f0158f71b2 don't expose mutable access to UserAccount
it's not preferable that the full mutable access is available to
`ZapWallet`, but this PR is becoming too big already

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 15:45:57 -04:00
kernelkind
10d6d740b8 migrate accounts to be referenced through pks instead of indices
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:33 -04:00
kernelkind
d092f5c23e move switching related actions from notedeck -> columns
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:29 -04:00
kernelkind
8e92a97a57 make selected accounts non optional
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-02 11:41:17 -04:00
Fernando López Guevara
c6dbb0e856 fix(content): handle case where notes are not loaded 2025-06-24 09:15:52 -07:00
kernelkind
589a8a904c fix log messages
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-06-23 16:32:28 -04:00