diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-12-14 18:55:46 +0200 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-12-14 18:58:59 +0200 |
commit | 65efb23f1498a6d0b11c933d6f9c4109b7e2c899 (patch) | |
tree | 5011b3091ac94a3d03270a8032b3b4324415ebe5 /ui/src/components | |
parent | d2b4057b7b63d909a2d47339938a8286cf6a7223 (diff) |
melib/MailBackend: add refresh() method
Initiate refresh manually.
Diffstat (limited to 'ui/src/components')
-rw-r--r-- | ui/src/components/mail/listing.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs index c6825a99..24ed7c94 100644 --- a/ui/src/components/mail/listing.rs +++ b/ui/src/components/mail/listing.rs @@ -673,6 +673,15 @@ impl Component for Listing { return true; } } + UIEvent::Input(ref key) + if shortcut!(key == shortcuts[Listing::DESCRIPTION]["refresh"]) => + { + let folder_hash = + context.accounts[self.cursor_pos.0].folders_order[self.cursor_pos.1]; + let account = &mut context.accounts[self.cursor_pos.0]; + account.refresh(folder_hash); + return true; + } UIEvent::StartupCheck(_) => { self.dirty = true; context |