summaryrefslogtreecommitdiff
path: root/src/components/mail/listing/conversations.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/mail/listing/conversations.rs')
-rw-r--r--src/components/mail/listing/conversations.rs25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/components/mail/listing/conversations.rs b/src/components/mail/listing/conversations.rs
index c2d396cc..be088a2b 100644
--- a/src/components/mail/listing/conversations.rs
+++ b/src/components/mail/listing/conversations.rs
@@ -611,7 +611,6 @@ impl fmt::Display for ConversationsListing {
}
impl ConversationsListing {
- //const DESCRIPTION: &'static str = "conversations listing";
//const PADDING_CHAR: char = ' '; //░';
pub fn new(coordinates: (AccountHash, MailboxHash)) -> Box<Self> {
@@ -1230,19 +1229,19 @@ impl Component for ConversationsListing {
match (&event, self.focus) {
(UIEvent::Input(ref k), Focus::Entry)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_right"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"]) =>
{
self.set_focus(Focus::EntryFullscreen, context);
return true;
}
(UIEvent::Input(ref k), Focus::EntryFullscreen)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
self.set_focus(Focus::Entry, context);
return true;
}
(UIEvent::Input(ref k), Focus::Entry)
- if shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ if shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
self.set_focus(Focus::None, context);
return true;
@@ -1258,8 +1257,8 @@ impl Component for ConversationsListing {
match *event {
UIEvent::Input(ref k)
if matches!(self.focus, Focus::None)
- && (shortcut!(k == shortcuts[Listing::DESCRIPTION]["open_entry"])
- || shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_right"])) =>
+ && (shortcut!(k == shortcuts[Shortcuts::LISTING]["open_entry"])
+ || shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"])) =>
{
if let Some(thread) = self.get_thread_under_cursor(self.cursor_pos.2) {
self.view = ThreadView::new(self.cursor_pos, thread, None, context);
@@ -1269,21 +1268,21 @@ impl Component for ConversationsListing {
}
UIEvent::Input(ref k)
if !matches!(self.focus, Focus::None)
- && shortcut!(k == shortcuts[Listing::DESCRIPTION]["exit_entry"]) =>
+ && shortcut!(k == shortcuts[Shortcuts::LISTING]["exit_entry"]) =>
{
self.set_focus(Focus::None, context);
return true;
}
UIEvent::Input(ref k)
if matches!(self.focus, Focus::Entry)
- && shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_right"]) =>
+ && shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_right"]) =>
{
self.set_focus(Focus::EntryFullscreen, context);
return true;
}
UIEvent::Input(ref k)
if !matches!(self.focus, Focus::None)
- && shortcut!(k == shortcuts[Listing::DESCRIPTION]["focus_left"]) =>
+ && shortcut!(k == shortcuts[Shortcuts::LISTING]["focus_left"]) =>
{
match self.focus {
Focus::Entry => {
@@ -1300,7 +1299,7 @@ impl Component for ConversationsListing {
}
UIEvent::Input(ref key)
if !self.unfocused()
- && shortcut!(key == shortcuts[Listing::DESCRIPTION]["select_entry"]) =>
+ && shortcut!(key == shortcuts[Shortcuts::LISTING]["select_entry"]) =>
{
if self.modifier_active && self.modifier_command.is_none() {
self.modifier_command = Some(Modifier::default());
@@ -1560,8 +1559,10 @@ impl Component for ConversationsListing {
ShortcutMaps::default()
};
- let config_map = context.settings.shortcuts.listing.key_values();
- map.insert(Listing::DESCRIPTION, config_map);
+ map.insert(
+ Shortcuts::LISTING,
+ context.settings.shortcuts.listing.key_values(),
+ );
map
}