-
Notifications
You must be signed in to change notification settings - Fork 49
Switch Copy Note ID to nevent #1183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@kernelkind review - this is useless without relay hints. Great catch. Working on fixing. |
crates/notedeck/src/note/context.rs
Outdated
| pub action: NoteContextSelection, | ||
| } | ||
|
|
||
| const MAX_RELAY_HINTS: usize = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why cap it at 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because we had an issue on the ios side of massive nevent links that look really bad
crates/notedeck/src/note/context.rs
Outdated
| /// We intentionally skip pool-based fallbacks: NIP-19 hints should only advertise relays | ||
| /// that are likely to store the event, and emitting no hint is preferable to speculating. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delete these lines, "where the note was actually observed" suffices IMO
crates/notedeck/src/note/context.rs
Outdated
| ui.ctx().copy_text(bech); | ||
| } | ||
| } | ||
| NoteContextSelection::CopyNoteId => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should either rename CopyNoteId -> CopyNevent or create a new CopyNevent if we want to preserve copying the note id specifically
crates/notedeck/src/note/context.rs
Outdated
| NoteContextSelection::CopyLink => { | ||
| let damus_url = |s| format!("https://damus.io/{s}"); | ||
| if note_author_is_selected_acc { | ||
| let relay_hints = relay_hints_for_note(note, txn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can use this for both, not just if the note author is the selected account
crates/notedeck/src/note/context.rs
Outdated
| Ok(json) => ui.ctx().copy_text(json), | ||
| Err(err) => error!("error copying note json: {err}"), | ||
| }, | ||
| NoteContextSelection::CopyLink => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should rename this from CopyLink -> CopyNeventLink. It's confusing, since elsewhere we have an action for copying a profile link
|
@kernelkind had a go at addressing your comments |
|
we should keep it "Copy note id". "nevent id" is too technical and low level |
changed terminology from "copy neventID" to "copy noteID"
fixed in da12774 |
Summary