diff --git a/crates/notedeck_chrome/src/chrome.rs b/crates/notedeck_chrome/src/chrome.rs index 725b000..f29cfd6 100644 --- a/crates/notedeck_chrome/src/chrome.rs +++ b/crates/notedeck_chrome/src/chrome.rs @@ -501,7 +501,7 @@ fn chrome_handle_app_action( let txn = Transaction::new(ctx.ndb).unwrap(); notedeck_columns::actionbar::execute_and_process_note_action( - ¬e_action, + note_action, ctx.ndb, columns .decks_cache diff --git a/crates/notedeck_columns/src/actionbar.rs b/crates/notedeck_columns/src/actionbar.rs index 77349ef..c4826c1 100644 --- a/crates/notedeck_columns/src/actionbar.rs +++ b/crates/notedeck_columns/src/actionbar.rs @@ -24,7 +24,7 @@ pub enum TimelineOpenResult { /// The note action executor for notedeck_columns #[allow(clippy::too_many_arguments)] fn execute_note_action( - action: &NoteAction, + action: NoteAction, ndb: &Ndb, router: &mut Router, timeline_cache: &mut TimelineCache, @@ -38,19 +38,18 @@ fn execute_note_action( ) -> Option { match action { NoteAction::Reply(note_id) => { - router.route_to(Route::reply(*note_id)); + router.route_to(Route::reply(note_id)); None } NoteAction::Profile(pubkey) => { - let kind = TimelineKind::Profile(*pubkey); + let kind = TimelineKind::Profile(pubkey); router.route_to(Route::Timeline(kind.clone())); timeline_cache.open(ndb, note_cache, txn, pool, &kind) } NoteAction::Note(note_id) => 'ex: { - let Ok(thread_selection) = - ThreadSelection::from_note_id(ndb, note_cache, txn, *note_id) + 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())); break 'ex None; @@ -70,7 +69,7 @@ fn execute_note_action( } NoteAction::Quote(note_id) => { - router.route_to(Route::quote(*note_id)); + router.route_to(Route::quote(note_id)); None } @@ -81,7 +80,7 @@ fn execute_note_action( let sender = cur_acc.key.pubkey; - match zap_action { + match &zap_action { ZapAction::Send(target) => 'a: { let Some(wallet) = get_wallet_for_mut(accounts, global_wallet, sender.bytes()) else { @@ -122,7 +121,7 @@ fn execute_note_action( /// Execute a NoteAction and process the result #[allow(clippy::too_many_arguments)] pub fn execute_and_process_note_action( - action: &NoteAction, + action: NoteAction, ndb: &Ndb, columns: &mut Columns, col: usize, diff --git a/crates/notedeck_columns/src/nav.rs b/crates/notedeck_columns/src/nav.rs index a940399..6059b02 100644 --- a/crates/notedeck_columns/src/nav.rs +++ b/crates/notedeck_columns/src/nav.rs @@ -134,7 +134,7 @@ impl RenderNavResponse { #[must_use = "Make sure to save columns if result is true"] pub fn process_render_nav_response( - &self, + self, app: &mut Damus, ctx: &mut AppContext<'_>, ui: &mut egui::Ui, @@ -142,12 +142,7 @@ impl RenderNavResponse { let mut switching_occured: bool = false; let col = self.column; - if let Some(action) = self - .response - .response - .as_ref() - .or(self.response.title_response.as_ref()) - { + if let Some(action) = self.response.response.or(self.response.title_response) { // start returning when we're finished posting match action { RenderNavAction::Back => {