add preview flag to NoteAction

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-06-17 12:36:18 -04:00
parent b3569e90d6
commit 87b4b5fc70
5 changed files with 30 additions and 9 deletions

View File

@@ -60,7 +60,7 @@ fn execute_note_action(
router_action = Some(RouterAction::route_to(Route::Timeline(kind.clone())));
timeline_res = timeline_cache.open(ndb, note_cache, txn, pool, &kind);
}
NoteAction::Note(note_id) => 'ex: {
NoteAction::Note { note_id, preview } => 'ex: {
let Ok(thread_selection) = ThreadSelection::from_note_id(ndb, note_cache, txn, note_id)
else {
tracing::error!("No thread selection for {}?", hex::encode(note_id.bytes()));

View File

@@ -184,7 +184,13 @@ fn show_notes(
}
fn strip_note_action(action: NoteAction) -> Option<NoteAction> {
if matches!(action, NoteAction::Note(_)) {
if matches!(
action,
NoteAction::Note {
note_id: _,
preview: false,
}
) {
return None;
}