262 Commits

Author SHA1 Message Date
William Casarin
eac5d41e3c fix nostrdb-rs platform independence
commit 6956b9f955463404b8eff3b7abe0cc3092cb5958
Author: Martti Malmi <sirius@iki.fi>
Date:   Fri Nov 7 17:35:31 2025 +0200

    fix non-android target metadata.rs u8

    platform-independent fix

diff --git a/src/metadata.rs b/src/metadata.rs
index 977cfc859915..bbaa0e4e724c 100644
--- a/src/metadata.rs
+++ b/src/metadata.rs
@@ -117,11 +117,9 @@ impl<'a> ReactionEntry<'a> {
     pub fn as_str(&'a self, buf: &'a mut [i8; 128]) -> &'a str {
         unsafe {
             let rstr = bindings::ndb_note_meta_reaction_str(self.as_ptr());
-            // weird android compilation issue
-            #[cfg(target_os = "android")]
-            let ptr = { bindings::ndb_reaction_to_str(rstr, buf.as_mut_ptr() as *mut u8) };
-            #[cfg(not(target_os = "android"))]
-            let ptr = { bindings::ndb_reaction_to_str(rstr, buf.as_mut_ptr()) };
+            // Cast to c_char for platform independence (i8 on Linux, u8 on macOS)
+            let ptr =
+                bindings::ndb_reaction_to_str(rstr, buf.as_mut_ptr() as *mut std::os::raw::c_char);
             let byte_slice: &[u8] = std::slice::from_raw_parts(ptr as *mut u8, libc::strlen(ptr));
             std::str::from_utf8_unchecked(byte_slice)
         }

Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-07 11:57:25 -08:00
William Casarin
0a4eb469ab nostrdb: update for windows fix 2025-11-06 21:34:26 -08:00
William Casarin
058df9d6f0 update nostrdb
Signed-off-by: William Casarin <jb55@jb55.com>
2025-11-04 14:52:58 -08:00
kernelkind
88e6415253 fix(thread): remove flicker on opening thread
fixed bug in `egui-nav`

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-20 15:42:13 -07:00
William Casarin
adba4ece22 Merge sidebar fixes by kernel #1163
kernelkind (9):
      update egui-nav
      fix: nav drawer shadow extends all the way vertically
      drawer: only use drag on mobile
      new `egui`
      update egui_nav
      refactor: move `galley_centered_pos` to notedeck_ui
      refactor: rename assets
      assets: add accounts image
      chrome: ui polish
2025-10-20 11:18:52 -07:00
kernelkind
54485843d0 update egui_nav
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-17 01:04:24 -04:00
kernelkind
6ae3177334 new egui
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-16 21:22:26 -04:00
kernelkind
7528df25b9 update egui-nav
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-16 21:22:18 -04:00
William Casarin
34c5153618 Merge quote reposts, share links by kernel
kernelkind (17):
      add `ProfileContext`
      add `RenderNavAction::RepostAction` & render `RepostDecisionView`
      add `after_action` to `SingletonRouter`
      add repost fns
      feat: copy damus.io link to clipboard
      fix: custom zap wrapping
      fix: profile wrapping
      process popup after action
      refactor: move profile.rs -> url.rs to new module
      refactor: move shared context stuff up in scope
      refactor: rename `NoteAction::Quote` -> `Repost`
      render profile context button
      route: add CloseSheetThenRoute `RouterAction`
      route: add `RepostDecision`
      split popup correctly for repost & update egui-nav
      ui: add `ProfileContextWidget`
      ui: add `RepostDecisionView`
2025-10-06 08:56:02 -07:00
kernelkind
dc23f8fe1e split popup correctly for repost & update egui-nav
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-04 18:09:27 -04:00
William Casarin
3a8d06cb82 Merge tracy profiling by kernel
kernelkind (1):
      add tracy support
2025-10-02 12:33:36 -07:00
kernelkind
65b7cfec94 cargo: expose egui-nav to chrome
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-01 21:47:42 -04:00
kernelkind
c4eccf0a8e TMP: new egui-nav
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-10-01 21:47:22 -04:00
kernelkind
0717353717 add tracy support
android: `make android-tracy`
desktop: `cargo run --release --features tracy`

connect via `127.0.0.1:8086`
if using android then want to use desktop, unset the adb port
forwarding:
`adb forward --remove tcp:8086`

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-30 19:54:19 -04:00
William Casarin
0b4545d598 filter: reservoir sample the algo feed
so its not the same static 15 pubkeys

Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-08 15:03:02 -07:00
kernelkind
3a0da9a3e0 nav: reduce back nav threshold from 1/2 to 1/4
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-04 14:24:07 -07:00
William Casarin
ea65af8d5b v0.7.1
William Casarin (2):
      fix android-activity crash on unhandled app cmds

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-28 06:54:44 +08:00
William Casarin
11aa2142cf fix android-activity crash on unhandled app cmds
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-26 17:46:13 -07:00
Fernando López Guevara
6ee2b28e70 media: handle upload on android 2025-08-26 17:10:38 -07:00
William Casarin
31ee64827a v0.7.0
First official Android Release!

- Keyboard visibiliy
- core lightning node ui (experimental)
- Onboarding follow packs
- Reaction notifications!
- Japanese translations

Terry Yiu (3):
      Remove unused strings from translation files
      Import translations
      Add Japanese and Portuguese (Portugal) languages

William Casarin (38):
      battery: disable render every 100ms
      dave: switch to logical time
      force oled with --mobile flag
      gif: disable continuous gif rendering
      ui: add AnimationMode to control GIF rendering behavior
      debug: add repaint causes debug tool
      Merge thread scroll fix by kernel
      chrome: add virtual keyboard ui
      android: fix dark/light mode and folding screen crash
      notedeck app: add clndash
      clndash: initial peer channel listing
      default logs
      clndash: channels ui
      clndash: summary cards
      clndash: include listpeerchannel errors
      clndash: invoice loading
      clndash: zap rendering
      clndash: fix invoice order, return more stuff
      clndash: reorganize
      clndash: configurable host
      clndash: add readme
      clndash: readme
      clndash: tweak readme
      clndash: tweak links in readme
      clndash: specify you need --clndash
      clndash: dont forget CLNDASH_ID
      remove hjkl bindings
      Merge Japanese and Portuguese translations from Terry
      clippy: fix lint errors
      Implement soft keyboard visibility on Android
      chrome: greatly improve soft-keyboard visibility & layout handling
      args: parse hashtag columns from cli
      debug: fix memory debug builds
      Merge remote-tracking branch 'github/pr/1087' into notifications
      Merge remote-tracking branch 'github/pr/1081' into notifications  especially if it merges an updated upstream into a topic branch.
      tweak follow pack design
      chrome: remove dev log
      v0.7.0

kernelkind (53):
      TMP: use new egui-nav to fix scroll offset issues
      add `scroll_offset` to `NoteAction::Note`
      add `ThreadNote::set_scroll_offset`
      set scroll offset when routing to thread
      appease clippy
      make search icon more customizable
      make compose button animate horiz rather than vert
      add toolbar icons to `notedeck_ui`
      add select_by_route
      add toolbar related logic
      add toolbar defaults
      copy toolbar rendering to `notedeck_ui`
      use toolbar in columns rather than chrome
      clippy: allow collapsible match
      add flags to `ScaledTexture`
      extract a pub `render_media` from image_carousel
      add impl for `ScaledTextureFlags::RESPECT_MAX_DIMS`
      add nip51 set caching structs
      nip 51 set widget
      add onboarding 'manager'
      TMP: temporary author for trusted pks list
      add onboarding view
      add onboarding related state to app
      integrate onboarding
      fix contact list bug
      use the onboarding follow pack curator pubkey
      make `TimelineCache::notes` private
      remove commented out code...
      move `HybridSet` to own file
      ui: add like icon
      appease clippy
      add muted helper
      unknownids: use pk bytes
      replace `HybridSet` with `NoteUnits`
      add reactions kind to notifications filter
      add `TimelineUnits`
      note: account for mutes in the notifications dot
      make since optimize accept Option<&NoteRef> instead of notes
      prop `UnknownIds` for initial timeline
      ui: add rendering for `NoteUnit`s
      upgrade `TimelineOpenResult` to hold new pubkeys too
      use `TimelineUnits` instead of `Vec<NoteRef>`
      ui: remove unnecessary reverse
      introduce failing test for reaction duplication bug
      fix duplicate ReactionUnit for multiple kth indices
      fix reaction target bug
      ui: reactions closer approximation of iOS design
      expose indexmap to notedeck
      use indexmap
      add Nip51SetCache helper methods
      add virtual list to `Onboarding`
      prop `Onboarding` as mut
      render follow pack by index from virtual list

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-26 15:05:12 -07:00
kernelkind
1658600604 expose indexmap to notedeck
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:11:28 -04:00
William Casarin
77ac91e810 Implement soft keyboard visibility on Android
- Added `SoftKeyboardContext` enum and support for calculating keyboard
  insets from both virtual and platform sources

- Updated `AppContext` to provide `soft_keyboard_rect` for determining
  visible keyboard area

- Adjusted UI rendering to shift content when input boxes intersect with
  the soft keyboard, preventing overlap

- Modified `MainActivity` and Android manifest to use
  `windowSoftInputMode="adjustResize"` and updated window inset handling

- Introduced helper functions (`include_input`, `input_rect`,
  `clear_input_rect`) in `notedeck_ui` for tracking focused input boxes

- Fixed Android JNI keyboard height reporting to clamp negative values

Together, these changes allow the app to correctly detect and respond
to soft keyboard visibility on Android, ensuring input fields remain
accessible when typing.

Fixes: https://github.com/damus-io/notedeck/issues/946
Fixes: https://github.com/damus-io/notedeck/issues/1043
2025-08-19 11:29:45 -07:00
William Casarin
2fde5addeb clndash: zap rendering
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-10 17:46:09 -07:00
William Casarin
f77e7898b6 clndash: invoice loading
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-10 16:28:21 -07:00
William Casarin
382ef772f5 clndash: initial peer channel listing
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-08 15:31:58 -07:00
William Casarin
53b4a8da5c notedeck app: add clndash
a core-lightning dashboard i'm working on

feature-gate it behind --clndash

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-08 13:19:39 -07:00
William Casarin
c60e1af3eb chrome: add virtual keyboard ui 2025-08-06 19:00:30 -07:00
William Casarin
87cb5ed515 Merge thread scroll fix by kernel
kernelkind (5):
      TMP: use new egui-nav to fix scroll offset issues
      add `scroll_offset` to `NoteAction::Note`
      add `ThreadNote::set_scroll_offset`
      set scroll offset when routing to thread
      appease clippy
2025-08-04 15:08:32 -07:00
William Casarin
9cbba37507 debug: add repaint causes debug tool
enable with --debug, click on fps/frame time counter

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 15:04:38 -07:00
kernelkind
75eefcbf72 TMP: use new egui-nav to fix scroll offset issues
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:12:27 -04:00
William Casarin
48a11b9bab v0.6.0
What's new
==========

- New notifications indiciator dot on toolbar
- Fixed mentions/tagging
- Gave dave a new swarm look
- Persist some more settings
- Allow sorting thread replies newest first in options
- Show full created date format on selected notes
- Show client name on selected notes
- Higher quality media
- Increase media viewer transition animation
- Fix some ui glitches when replying
- Fix gpu crash on adrendo devices (some samsung galaxy tablets)

Fernando López Guevara (14):
      feat(note): show full created date format on selected notes
      feat(notedeck): add cross-platform URI opener
      feat(settings): allow sorting thread replies newest first
      feat(settings): persist settings to storage
      feat(settings): show note full date
      fix(media): add spacing
      fix(note-content): avoid empty text blocks
      fix(settings): use localization
      refactor(settings): add settings sections methods
      settings: use timed serializer, handle zoom properly, use custom text style for note body font size, added font size slider, added preview note
      update i18n comments for source client options
      Update crates/notedeck/src/persist/settings_handler.rs

Terry Yiu (2):
      Import Spanish translations
      Fix localization issues and export strings for translation

William Casarin (31):
      add NotedeckOptions and feature flags, add notebook feature
      android: fix build
      chrome: remove duplication in app setup
      columns: clean up flags, refactor content rendering
      columns: fix double reference
      dave: switch to use standard vertex/index buffers
      evolve dave into a swarm
      init notebook
      lint: fix format issue
      make clippy happy
      media: less blurry media
      mediaviewer: decrease transition anim from 500ms to 300ms
      note/ui: fix reply line when replying in narrow mode
      note: small doc fix
      note: turn off full date view for previews
      notebook: draw edges and arrows
      notebook: fix heights of nodes
      notebook: fix node sizes
      notebook: move ui code into its own file
      notebook: remove redundant closure
      perf: a few micro optimizations
      post: set client tag to Damus Android on android
      refactor: collapse client label settings; drop CLI/settings toggles
      remove explicit loop continue
      ui/note: fix extra padding in block renderer
      ui/note: fix indented actionbar in non-wide mode
      ui/note: fix reply description item spacing
      ui/note: fix width instabilities because of spacing_mut
      ui/note: slightly more spacing between blocks
      ui: keep original design on non-narrow

kernelkind (12):
      TMP: update egui for better TextInputState handling
      add `NotesFreshness` to `TimelineTab`
      chrome: method to find whether there are unseen notifications
      extract notifications filter to own method
      fix scroll regression
      insert space after mention selection
      mention-picker: re-add spacing from inner_margin
      mentions: don't lose focus after select mention
      paint unseen indicator
      rename `SearchResultsView` => `MentionPickerView`
      set fresh from `TimelineCache`
      use unseen notification indicator

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 08:41:46 -07:00
Fernando López Guevara
ab84304265 feat(settings): show note full date 2025-08-01 08:38:49 -03:00
William Casarin
b1a5dd6cab add NotedeckOptions and feature flags, add notebook feature
This switches from bools to flags in our Args struct. We also add
notebook as an optional feature flag (--notebook) since its not ready.
2025-07-31 16:03:13 -07:00
William Casarin
1ab4eeb48c init notebook
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-31 15:07:50 -07:00
Fernando López Guevara
f282363748 feat(notedeck): add cross-platform URI opener 2025-07-30 16:27:51 -07:00
William Casarin
ba76b20ad2 Merge tagging fixes from kernel
Fixes the following:
1. space added after mention
2. can scroll the mention picker
3. don't lose focus of textedit after mention selection

kernelkind (6):
      rename `SearchResultsView` => `MentionPickerView`
      fix scroll regression
      mention-picker: re-add spacing from inner_margin
      mentions: don't lose focus after select mention
      TMP: update egui for better TextInputState handling
      insert space after mention selection

Fixes: https://github.com/damus-io/notedeck/issues/985
Fixes: https://github.com/damus-io/notedeck/issues/728
Fixes: https://github.com/damus-io/notedeck/issues/986

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-30 16:23:12 -07:00
kernelkind
233be47659 TMP: update egui for better TextInputState handling
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-30 17:45:12 -04:00
William Casarin
2bd636ce0a v0.5.9 - Better Media!
- Persist settings to storage
- New fullscreen media viewer with panning and zoom
- Changed note rendering to use the full screen width
- Fixed more wrapping issues
- Fixed crash on large images
- Fix nwc copy/paste
- Portugese translations
- Show locale language names instead of identifier

Fernando López Guevara (5):
      feat(settings): persist settings to storage
      fix(columns): render wide notes on narrow screen
      fix(media): edge-to-edge image display on narrow screen
      fix(media): use ScaledTexture
      fix(note_actionbar): add invisible label to stabilize section width ¯\_(ツ)_/¯

Terry Yiu (5):
      Add human-readable names to locales in settings
      Add Portuguese (Brazil) language and translations
      Export strings for translation
      Import translations
      Internationalize ShowNoteClientOptions labels

William Casarin (19):
      Fullscreen MediaViewer refactor
      images: always resize large images
      media: change is_narrow logic to is_scaled
      media/viewer: click anywhere to close
      media/viewer: fix broken culling
      media/viewer: fix flicker on escape-close
      media/viewer: fullscreen transition animations
      media/viewer: handle click-to-close interactions
      media/viewer: provide image-click provenance
      media/viewer: slower animation
      note/options: made wide the default
      threads: disable wide in threads
      ui/note: fix another reply_desc wrapping issue
      ui/note: simplify weird hack and make note of it
      ui/settings: fix small double clone nit
      ui/wallet: small refactor to use return instead of break
      wallet: fix nwc copy/paste

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-29 12:24:17 -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
c891f8585d v0.5.8
we got back swipe on everything now fam

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 15:45:45 -07:00
William Casarin
2648967d7b lockfile: fixup
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-24 15:37:33 -07:00
kernelkind
b05d39cc81 TMP: update egui-nav
need this to make drag switching work

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-24 17:53:12 -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
4e27c1f491 v0.5.7
Whats new
=========

- Swipe nav on full screen media
- Made action buttons bigger
- Fix zap button not appearing
- Allow removal of Damoose account
- Profile is now clickable from side bar

- New settings view:
  * Resize zoom level
  * Clear cache
  * Change locale

- Localization support
  * German
  * Spanish
  * French
  * Chinese
  * Thai

Log
---

Fernando López Guevara (3):
      feat(full-screen-media): add swipe navigation
      feat(settings): add settings view
      fix(columns): prevent crash when switching to account with no columns

Terry Yiu (9):
      Add Fluent-based localization manager and add script to export source strings for translations
      Add French, German, Simplified Chinese, and Traditional Chinese translations
      Add Spanish (Latin America and Spain) translations
      Add Thai translations
      Add localization documentation to notedeck DEVELOPER.md
      Clean up time_ago_since, add tests, and internationalize strings
      Fix export_source_strings.py to adjust for tr! and tr_plural! macro signature changes
      Internationalize user-facing strings and export them for translations
      Update Chinese, French, and German translations

William Casarin (15):
      args: add --locale option
      debug: add startup query debug log
      fix missing zap button
      fix one missing home string
      gitignore: remove cache
      i18n: always have en-XA available
      i18n: disable bidi for tests
      i18n: disable broken tests for now
      i18n: make localization context non-global
      media/trust: always show if its yourself
      ripgrep: add ignore file for ftl files
      settings: fix route to relay
      ui/note: make buttons larger
      ui/note: small refactor to use returns instead of break
      wallet: remove unused flag in note context

kernelkind (14):
      add ChromePanelAction::Profile & use for pfp
      add new Accounts button to chrome sidebar
      allow removal of Damoose account
      appease clippy
      bugfix: properly sub to new selected acc after removal of selected
      bugfix: unsubscribe all decks when log out account
      bugfix: unsubscribe from timelines on deck deletion
      expose `AccountCache::falback`
      fix: sometimes most recent contacts list wasn't used
      make `UserAccount` cloneable
      move select account logic to own method
      use `NwcError` instead of nwc::Error
      use saturating sub

name                                                  added  removed  commits
kernelkind <kernelkind@gmail.com>                     +328   -50      14
Fernando López Guevara <fernando.lguevara@gmail.com>  +802   -36      3
William Casarin <jb55@jb55.com>                       +1603  -1297    15
Terry Yiu <git@tyiu.xyz>                              +7547  -1024    9

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 13:03:28 -07:00
Fernando López Guevara
da6ede5f69 feat(settings): add settings view 2025-07-23 15:33:17 -03: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
d07c3e9135 Add Fluent-based localization manager and add script to export source strings for translations
Changelog-Added: Added Fluent-based localization manager and added script to export source strings for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:40:06 -07:00
William Casarin
0248a9ed2a v0.5.6
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-21 05:48:07 -07:00
William Casarin
2c1a42efd4 v0.5.5
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-20 10:23:41 -07:00
William Casarin
61f4d6b532 db: fix bad query bug in author-kind queries
it was matching authors it shouldn't have

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 11:01:58 -07:00