Commit Graph

71 Commits

Author SHA1 Message Date
William Casarin
b4cb44a3d5 gif: don't allow retries
seems to be spamming

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-26 12:49:32 -08:00
kernelkind
e5fc461a79 use SupportedMimeType for media_upload
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
490dedfaf1 integrate gifs
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
3e79f92291 introduce gif animation
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
9592452757 URL mime hosted completeness
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
33fdf647e3 migrate to using Images instead of MediaCache directly
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
fc9e1ff7f6 introduce Images
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
888a933e56 support multiple media cache files
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
7c2b4775f1 move MediaCache rendering to render_media_cache call
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
594ea0b42d Use TexturedImage in MediaCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
4f4a0feb8c rename ImageCache -> MediaCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
bf68eb3ea8 add SupportedMimeType
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
5791b0c5b1 use mime_guess
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
4cd80c10b1 introduce UrlMimes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
9466c10875 use bincode
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
William Casarin
d82d7fd00d Merge relay debug view fixes & more strict args #711
Ken Sedgwick (5):
      drive-by compiler warning fixes
      drive-by clippy fixes
      add derive Debug to some things
      panic on unknown CLI arguments
      move RelayDebugView to notedeck crate and restore --relay-debug

William Casarin (4):
      clippy: fix lint
      args: skip creation of vec
      nix: fix android build

Link: https://github.com/damus-io/notedeck/pull/711
2025-02-10 17:03:23 -08:00
William Casarin
6fb720e0c5 args: skip creation of vec
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-10 16:57:50 -08:00
William Casarin
7f0d0106d9 Merge remote-tracking branch 'github/pr/724' 2025-02-10 16:52:56 -08:00
jglad
8588600a2c fix: handle missing file [#715] 2025-02-08 10:52:37 +01:00
William Casarin
8c49e6e5f6 Merge explicitly activate and deactivate account relay/muted list #678
Ken Sedgwick (4):
      drive-by compiler warning fixes
      improve debug logging, comments, and variable names for clarity
      explicitly activate and deactivate account relay list subs
      explicitly activate and deactivate account muted list subs
2025-02-07 11:07:17 -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
482313f883 add relay hints to Mention::{Profile,Event} and UnknownIds 2025-02-06 10:08:01 -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
William Casarin
fd030f5b5c Merge rewrite deck serialization, timeline cache, add algo timelines #712
William Casarin (19):
      algos: introduce last_n_per_pubkey_from_tags
      wip algo timelines
      Initial token parser combinator
      token_parser: unify parsing and serialization
      token_serializer: introduce TokenWriter
      token_parser: simplify AddColumnRoute serialization
      tokens: add a more advanced tokens parser
      tokens: add AccountsRoute token serializer
      tokens: add PubkeySource and ListKinds token serializer
      tokens: add TimelineRoute token serializer
      tokens: initial Route token serializer
      add tokenator crate
      note_id: add hex helpers for root notes
      tokens: add token serialization for AlgoTimeline
      tokens: add token serialization for TimelineKind
      tokens: switch over to using token serialization
      Switch to unified timeline cache via TimelineKinds
      hashtags: click hashtags to open them
2025-02-05 18:46:16 -08:00
William Casarin
0cc1d8a600 Switch to unified timeline cache via TimelineKinds
This is a fairly large rewrite which unifies our threads, timelines and
profiles. Now all timelines have a MultiSubscriber, and can be added
and removed to columns just like Threads and Profiles.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-05 18:30:45 -08:00
William Casarin
ae85f2dd34 version: bump to 0.3.1
Just a binary fix for ubuntu

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 11:51:16 -08:00
William Casarin
d85b610cf4 note_id: add hex helpers for root notes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-04 08:08:08 -08:00
William Casarin
7afe3b7d7c algos: introduce last_n_per_pubkey_from_tags
This function creates filters for the base our first algo in Damus:

Called "last N note per pubkey". I don't have a better name for it.

This function generates a query in the form:

[
  {"authors": ["author_a"], "limit": 1, "kinds": [1]
, {"authors": ["author_b"], "limit": 1, "kinds": [1]
, {"authors": ["author_c"], "limit": 1, "kinds": [1]
, {"authors": ["author_c"], "limit": 1, "kinds": [1]
  ...
]

Due to an unfortunate restriction currently in nostrdb and strfry, we
can only do about 16 to 20 of these at any given time. I have made
this limit configurable in strfry[1]. I just need to do the same in
nostrdb now.

[1] https://github.com/hoytech/strfry/pull/133

Changelog-Added: Add last_n_per_pubkey_from_tags algo function
2025-02-04 08:08:08 -08:00
William Casarin
69b7581a53 Notedeck Alpha 2 Release - v0.3
Thanks again to kernel and ken, as well as some new contributors:
kieran, daniel saxton for our alpha 2 release!

Added
=====

- Clicking a mention now opens profile page (William Casarin)
- Note previews when hovering reply descriptions (William Casarin)
- Media uploads (kernelkind)
- Profile editing (kernelkind)
- Add hashtags to posts (Daniel Saxton)
- Enhanced command-line interface for user interactions (Ken Sedgwick)
- Various Android updates and compatibility improvements (Ken Sedgwick, William Casarin)
- Debug features for user relay-list and mute list synchronization (Ken Sedgwick)

Changed
=======

- Add confirmation when deleting columns (kernelkind)
- Enhance Android build and performance (Ken Sedgwick)
- Image cache handling using sha256 hash (kieran)
- Introduction of decks_cache and improvements (kernelkind)
- Migrated to egui v0.29.1 (William Casarin)
- Only show column delete button when not navigating (William Casarin)
- Show profile pictures in column headers (William Casarin)
- Show usernames in user columns (William Casarin)
- Switch to only notes & replies on some tabs (William Casarin)
- Tombstone muted notes (Ken)
- Pointer interactions enhancements in UI (William Casarin)
- Persistent theme setup across sessions (kernelkind)
- Increased ping intervals for network performance (William Casarin)
- Nostrdb update for async support (Ken Sedgwick)

Fixed
=====

- Fix GIT_COMMIT_HASH compilation issue (William Casarin)
- Fix avatar alignment in profile previews (William Casarin)
- Fix broken quote repost hitbox (William Casarin)
- Fix crash when navigating in debug mode (William Casarin)
- Fix long delays when reconnecting (William Casarin)
- Fix repost button size (William Casarin)
- Fixed since kind filters (kernelkind)
- Clippy warnings resolved (Dimitris Apostolou)

Refactoring & Improvements
==========================

- Numerous internal structural improvements and modularization (William Casarin, Ken Sedgwick)

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-31 10:31:07 -08:00
William Casarin
478603e16e contacts: disable hashtag follows for now
People are spamming hashtags with AI CP. Let's disable this until we
at least have image blurring.

Alternatively we could only show the link for people you don't follow.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-27 12:30:22 -08:00
William Casarin
0c3db9a31e Merge additional account relay list improvements from Ken
Ken Sedgwick (1):
      additional account relay list improvements
2025-01-25 16:16:03 -08:00
Dimitris Apostolou
2c8f6298b8 Fix clippy warnings
Signed-off-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
2025-01-24 19:32:24 +02: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
William Casarin
2cbae68a7f Merge remote-tracking branches 'github/pr/657' and 'github/pr/658' 2025-01-22 16:04:45 -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
366ca24ac1 drive-by clippy fixes 2025-01-21 10:18:37 -08:00
kieran
0249b5ab04 Always update accounts 2025-01-21 10:29:22 +00:00
kieran
01066bfb3d export enostr / nostrdb 2025-01-21 09:43:54 +00:00
William Casarin
835851ee52 Merge remote-tracking branch 'pr/656' 2025-01-20 15:51:03 -08:00
kieran
86e68b1c29 move Notedeck to notedeck crate 2025-01-20 23:25:31 +00:00
kieran
c401f4c484 note-ref: derive hash 2025-01-20 20:33:49 +00:00
William Casarin
4b542c0a74 switch to TimelineCache
Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 14:18:59 -08:00
William Casarin
a94ebc3603 mutes: hide logs
these are getting spammed on each frame. not ideal

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 12:43:03 -08:00
William Casarin
f9a09ea2be note: introduce RootNoteId
RootNoteId is simply a newtype for specifying an ID that is a root note
id (in the sense of a nip10 note)

This makes it more clear at the type level when referring to note ids

Signed-off-by: William Casarin <jb55@jb55.com>
2025-01-19 12:43:03 -08:00
kieran
1a744d8e3b image-cache: remove expect 2025-01-10 09:31:04 +00:00