summaryrefslogtreecommitdiffstats
path: root/ui/src/components
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-14 18:55:46 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2019-12-14 18:58:59 +0200
commit65efb23f1498a6d0b11c933d6f9c4109b7e2c899 (patch)
tree5011b3091ac94a3d03270a8032b3b4324415ebe5 /ui/src/components
parentd2b4057b7b63d909a2d47339938a8286cf6a7223 (diff)
melib/MailBackend: add refresh() method
Initiate refresh manually.
Diffstat (limited to 'ui/src/components')
-rw-r--r--ui/src/components/mail/listing.rs9
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