mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-21 10:30:48 +08:00
bin/inbox: Fix browser events
This commit is contained in:
+10
-10
@@ -300,6 +300,9 @@ impl Show<Message> 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<Message>) {
|
||||
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<Message>) {
|
||||
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<Message>) {
|
||||
let (mut search_text, mut search_cursor) = (
|
||||
self.state.search.clone().read().text,
|
||||
|
||||
Reference in New Issue
Block a user