Add set_seen shortcut in CompactListing
parent
c7bcb9e553
commit
2b5472adc3
|
@ -1093,6 +1093,12 @@ impl Component for CompactListing {
|
||||||
self.movement = Some(PageMovement::End);
|
self.movement = Some(PageMovement::End);
|
||||||
self.set_dirty();
|
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"] => {
|
UIEvent::Input(ref k) if self.unfocused && *k == shortcuts["exit_thread"] => {
|
||||||
self.unfocused = false;
|
self.unfocused = false;
|
||||||
self.dirty = true;
|
self.dirty = true;
|
||||||
|
@ -1331,6 +1337,14 @@ impl Component for CompactListing {
|
||||||
Key::Char('v')
|
Key::Char('v')
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"set_seen",
|
||||||
|
if let Some(key) = config_map.get("set_seen") {
|
||||||
|
(*key).clone()
|
||||||
|
} else {
|
||||||
|
Key::Char('n')
|
||||||
|
},
|
||||||
|
),
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
.cloned()
|
.cloned()
|
||||||
|
|
Loading…
Reference in New Issue