From 59ecb1edbd79dd3bc3dc185c871e9f147c2937bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 22 Apr 2025 17:00:56 +0200 Subject: [PATCH] fix(multiverse): Add a shortcut to mark rooms as read back --- labs/multiverse/src/main.rs | 4 ++++ labs/multiverse/src/widgets/help.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/labs/multiverse/src/main.rs b/labs/multiverse/src/main.rs index 492b7bc18..5756c21cd 100644 --- a/labs/multiverse/src/main.rs +++ b/labs/multiverse/src/main.rs @@ -352,6 +352,10 @@ impl App { self.room_view.set_selected_room(room_id); } + Event::Key(KeyEvent { code: Char('m'), modifiers: KeyModifiers::ALT, .. }) => { + self.room_view.mark_as_read().await + } + Event::Key(KeyEvent { code: Char('q'), modifiers: KeyModifiers::CONTROL, .. }) => { if !matches!(self.state.global_mode, GlobalMode::Default) { self.set_global_mode(GlobalMode::Default); diff --git a/labs/multiverse/src/widgets/help.rs b/labs/multiverse/src/widgets/help.rs index f0e376d13..821576c17 100644 --- a/labs/multiverse/src/widgets/help.rs +++ b/labs/multiverse/src/widgets/help.rs @@ -27,6 +27,10 @@ impl Widget for &mut HelpView { Row::new(vec![Cell::from("ALT-l"), Cell::from("Open the linked chunk details view")]), Row::new(vec![Cell::from("ALT-e"), Cell::from("Open the events details view")]), Row::new(vec![Cell::from("ALT-r"), Cell::from("Open the read receipt details view")]), + Row::new(vec![ + Cell::from("ALT-m"), + Cell::from("Mark the currently selected room as read"), + ]), Row::new(vec![Cell::from("Ctrl-q"), Cell::from("Quit Multiverse")]), Row::new(vec![ Cell::from("Ctrl-j / Ctrl-down"),