From 2b5472adc35313dcb32923154fa8433afcd38f2f Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 29 Sep 2019 01:55:39 +0300 Subject: [PATCH] Add set_seen shortcut in CompactListing --- ui/src/components/mail/listing/compact.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui/src/components/mail/listing/compact.rs b/ui/src/components/mail/listing/compact.rs index 896c9d087..7afd9db9a 100644 --- a/ui/src/components/mail/listing/compact.rs +++ b/ui/src/components/mail/listing/compact.rs @@ -1093,6 +1093,12 @@ impl Component for CompactListing { self.movement = Some(PageMovement::End); self.set_dirty(); } + UIEvent::Input(ref key) if *key == shortcuts["set_seen"] => { + let thread_hash = self.get_thread_under_cursor(self.cursor_pos.2, context); + self.perform_action(context, thread_hash, &ListingAction::SetSeen); + self.row_updates.push(thread_hash); + self.set_dirty(); + } UIEvent::Input(ref k) if self.unfocused && *k == shortcuts["exit_thread"] => { self.unfocused = false; self.dirty = true; @@ -1331,6 +1337,14 @@ impl Component for CompactListing { Key::Char('v') }, ), + ( + "set_seen", + if let Some(key) = config_map.get("set_seen") { + (*key).clone() + } else { + Key::Char('n') + }, + ), ] .iter() .cloned()