Commit Graph

281 Commits

Author SHA1 Message Date
William Casarin
9278c90802 time: more time-ago granularity in months/years
before: 1y
after:  1y 8mo

etc

Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-10 16:40:13 -07:00
William Casarin
c0fcf53ff6 Merge a bunch of fixes by kernel
kernelkind (3):
      fix: can upload photo from reply or quote
      fix: image shimmer bug
      feat: transitively trust images from parent note
2025-09-10 12:06:31 -07:00
William Casarin
f889b54ed9 refactor: replace notification bool prop drill with note option
Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-10 12:04:59 -07:00
William Casarin
7b4c96df91 images: disable useless animation frame log
Signed-off-by: William Casarin <jb55@jb55.com>
2025-09-10 12:03:41 -07:00
kernelkind
a5e7880e25 fix: image shimmer bug
if the same image on two seperate columns unblur at the same time,
it caused them both to continually cycle between blurred and
unblurred

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 19:20:42 -04:00
kernelkind
e0ed122951 use NdbQueryPackage to call ndb::query multiple times
necessary to ensure we can retrieve reposts from ndb

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:56:19 -04:00
kernelkind
e1ad2e231f filter: add repost kind to FilteredTags::into_filter
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:56:14 -04:00
kernelkind
b8eecf0c9a introduce NdbQueryPackages
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:53:22 -04:00
kernelkind
1b9e77a1ff filter: remove unused code
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-09 17:53:12 -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
8bc54cc519 zap: add requirements for zapping user
these requirements are specified by nip 57 but weren't implemented

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:07:53 -04:00
kernelkind
5282373434 use PayCache when zapping
to avoid needlessly querying ln endpoint

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:07:43 -04:00
kernelkind
14c59a6c94 introduce PayCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:03:57 -04:00
kernelkind
09238baee0 add LNUrlPayResponse
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:03:52 -04:00
kernelkind
594072cfb8 make get_users_zap_address Result
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:03:41 -04:00
kernelkind
2882b1c2d9 move ZapAddress to zaps/mod.rs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:01:08 -04:00
kernelkind
f4b8d235eb rename get_users_zap_endpoint -> get_users_zap_address
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:01:05 -04:00
kernelkind
cf48b29fd8 make endpoint error into struct
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 17:01:01 -04:00
kernelkind
2a7c5eb983 rename LNUrlPayRequest -> LNUrlPayResponseRaw
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-09-01 13:33:33 -04:00
Fernando López Guevara
6ee2b28e70 media: handle upload on android 2025-08-26 17:10:38 -07:00
William Casarin
e7843bad2f Merge remote-tracking branch 'github/pr/1087' into notifications 2025-08-26 09:58:50 -07:00
kernelkind
23f35c60bb add Nip51SetCache helper methods
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:13:17 -04:00
kernelkind
30c2ebdcc2 use indexmap
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:12:41 -04:00
kernelkind
1658600604 expose indexmap to notedeck
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 21:11:28 -04:00
kernelkind
697040d862 make since optimize accept Option<&NoteRef> instead of notes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:32:07 -04:00
kernelkind
4992e25b3a unknownids: use pk bytes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:47 -04:00
kernelkind
7b1ace328f add muted helper
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-25 10:31:43 -04:00
William Casarin
ccc188c0ae chrome: greatly improve soft-keyboard visibility & layout handling
Some checks failed
CI / Rustfmt + Clippy (push) Has been cancelled
CI / Check (android) (push) Has been cancelled
CI / Test (Linux) (push) Has been cancelled
CI / Test (macOS) (push) Has been cancelled
CI / Test (Windows) (push) Has been cancelled
CI / rpm/deb (aarch64) (push) Has been cancelled
CI / rpm/deb (x86_64) (push) Has been cancelled
CI / macOS dmg (aarch64) (push) Has been cancelled
CI / macOS dmg (x86_64) (push) Has been cancelled
CI / Windows Installer (aarch64) (push) Has been cancelled
CI / Windows Installer (x86_64) (push) Has been cancelled
CI / Upload Artifacts to Server (push) Has been cancelled
This reworks how we detect and respond to the on-screen keyboard so inputs
don’t get buried and the UI doesn’t “jump”.

- Add SoftKeyboardAnim + AnimState FSM for smooth IME open/close animation
- Centralize logic in keyboard_visibility() with clear edge states
- Animate keyboard height via animate_value_with_time instead of layer
  transforms
- Add ChromeOptions::KeyboardVisibility flag when focused input would be
  occluded
- Add SidebarOptions::Compact to collapse sidebar while typing
- Hide mobile toolbar when keyboard is open (columns app)
- Use .stick_to_bottom(true) in reply + profile editors; remove old spacer hack
- Virtual keyboard toggle moved to F1 in Debug builds
- Introduce SoftKeyboardContext::platform(ctx) helper
- Cleanup dead/commented code and wire up soft_kb_anim_state in Chrome

Result: inputs stay visible, open/close is smooth, and UI adjusts gracefully
when typing.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-20 15:28:28 -07: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
3aa4d00053 clippy: fix lint errors
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-19 09:45:36 -07:00
kernelkind
9ef72ec7de fix contact list bug
not a great solution but we're going to get a new sub manager
soon so it'll probably get replaced anyway

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:24 -04:00
kernelkind
8399c951fa add nip51 set caching structs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-17 15:07:00 -04:00
04f5725a9d Add Japanese and Portuguese (Portugal) languages
Changelog-Added: Added Japanese and Portuguese (Portugal) languages
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-08-10 20:02:01 -04: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
William Casarin
b94e715539 ui: add AnimationMode to control GIF rendering behavior
Introduces an `AnimationMode` enum with `Reactive`, `Continuous`, and
`NoAnimation` variants to allow fine-grained control over GIF playback
across the UI. This supports performance optimizations and accessibility
features, such as disabling animations when requested.

- Plumbs AnimationMode through image rendering paths
- Replaces hardcoded gif frame logic with reusable `process_gif_frame`
- Supports customizable FPS in Continuous mode
- Enables global animation opt-out via `NoteOptions::NoAnimations`
- Applies mode-specific logic in profile pictures, posts, media carousels, and viewer

Animation behavior by context
-----------------------------

- Profile pictures: Reactive (render only on interaction/activity)
- PostView: NoAnimation if disabled in NoteOptions, else Continuous (uncapped)
- Media carousels: NoAnimation or Continuous (capped at 24fps)
- Viewer/gallery: Always Continuous (full animation)

In the future, we can customize these by power settings.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 13:41:24 -07:00
kernelkind
d12f66e5cd appease clippy
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:13:53 -04:00
kernelkind
ea5c876da6 add scroll_offset to NoteAction::Note
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-08-04 16:12:38 -04:00
William Casarin
54b86ee5a6 gif: disable continuous gif rendering
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 12:19:21 -07:00
William Casarin
f6c44bba8a force oled with --mobile flag
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-04 12:06:58 -07:00
William Casarin
ad35547582 refactor: collapse client label settings; drop CLI/settings toggles
The "top vs bottom" client label setting was cluttering the UI and
codebase with toggles that added little value. This consolidates client
label handling into one option, removes unused CLI/settings knobs, and
makes NoteView’s API consistent and fluent. Result: fewer knobs, less
branching, and a clearer, more predictable UI.

Now client labels are only shown in one place: selected notes.

- Drop `--show-client` arg in notedeck and `--show-note-client=top|bottom`
  args in notedeck_columns

- Remove `NotedeckOptions::ShowClient` and related CLI parsing

- Delete `ShowSourceClientOption` enum, settings UI, and
  `SettingsAction::SetShowSourceClient`

- Collapse `NoteOptions::{ClientNameTop, ClientNameBottom}` into a single
  `NoteOptions::ClientName`

- Add `NoteOptions::{Framed, UnreadIndicator}`

- Move “framed” and unread indicator into flags (no more ad‑hoc bools)

- Add new NoteView builder methods: `.client_name()`, `.frame()`,
  `.unread_indicator()`, and `.selected_style()`

- CLI flags for showing client labels have been removed

- `ClientNameTop`/`ClientNameBottom` replaced with `ClientName`

- API using `framed` or `show_unread_indicator` booleans must now use
  the new flag setters

Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 16:16:15 -07:00
William Casarin
21fe3527a8 lint: fix format issue
Signed-off-by: William Casarin <jb55@jb55.com>
2025-08-03 13:58:14 -07:00
Fernando López Guevara
26ece3bc05 feat(note): show full created date format on selected notes 2025-08-01 08:42:58 -03:00
Fernando López Guevara
a64ff3b630 feat(note): created at show full date format 2025-08-01 08:40:10 -03:00
Fernando López Guevara
ab84304265 feat(settings): show note full date 2025-08-01 08:38:49 -03:00
William Casarin
d6d7e4c35e android: fix build
Fixes: dac786e60f ("chrome: remove duplication in app setup")
2025-07-31 17:29:06 -07:00
William Casarin
dac786e60f chrome: remove duplication in app setup
Also move debug warning to chrome so that headless
notedeck apps don't hit that.
2025-07-31 17:07:51 -07: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