From 6451dacaa3f7238de35a3bd48c1f8e26c0f88ed2 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Thu, 11 Dec 2025 13:59:20 +0100 Subject: [PATCH] bin/inbox: Fix browser events --- bin/commands/inbox/list.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bin/commands/inbox/list.rs b/bin/commands/inbox/list.rs index b0a73197..33933690 100644 --- a/bin/commands/inbox/list.rs +++ b/bin/commands/inbox/list.rs @@ -300,6 +300,9 @@ impl Show for App { } }, ); + if ui.has_input(|key| key == Key::Char('?')) { + ui.send_message(Message::Changed(Change::Page { page: Page::Help })); + } } Page::Help => { @@ -393,17 +396,7 @@ impl App { } }, ); - } - fn show_browser_footer(&self, frame: &mut Frame, ui: &mut im::Ui) { - ui.layout(Layout::vertical([1, 1]), None, |ui| { - self.show_browser_context(frame, ui); - self.show_browser_shortcuts(frame, ui); - }); - - if ui.has_input(|key| key == Key::Char('?')) { - ui.send_message(Message::Changed(Change::Page { page: Page::Help })); - } if ui.has_input(|key| key == Key::Enter) { ui.send_message(Message::Exit { operation: Some(InboxOperation::Show), @@ -419,6 +412,13 @@ impl App { } } + fn show_browser_footer(&self, frame: &mut Frame, ui: &mut im::Ui) { + ui.layout(Layout::vertical([1, 1]), None, |ui| { + self.show_browser_context(frame, ui); + self.show_browser_shortcuts(frame, ui); + }); + } + pub fn show_browser_search(&self, frame: &mut Frame, ui: &mut im::Ui) { let (mut search_text, mut search_cursor) = ( self.state.search.clone().read().text,