summaryrefslogtreecommitdiffstats
path: root/src/components/mail/listing.rs
diff options
context:
space:
mode:
authorManos Pitsidianakis <el13635@mail.ntua.gr>2020-12-02 20:47:48 +0200
committerManos Pitsidianakis <el13635@mail.ntua.gr>2020-12-02 21:01:22 +0200
commit48e7a493a92730bedccc5dfaac8242ed49d55a0d (patch)
tree0fea8098a1e5d5ced26efca389bb3e5f56157756 /src/components/mail/listing.rs
parente5b0ff4fe2799339076de95227b13d9755245f5f (diff)
Add reload-config command
Closes #84 Add "reload configuration" command
Diffstat (limited to 'src/components/mail/listing.rs')
-rw-r--r--src/components/mail/listing.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs
index f8b0f13b..2e74dbf8 100644
--- a/src/components/mail/listing.rs
+++ b/src/components/mail/listing.rs
@@ -613,6 +613,15 @@ impl Component for Listing {
fn process_event(&mut self, event: &mut UIEvent, context: &mut Context) -> bool {
match event {
+ UIEvent::ConfigReload { old_settings: _ } => {
+ self.theme_default = crate::conf::value(context, "theme_default");
+ let account_hash = context.accounts[self.cursor_pos.0].hash();
+ self.sidebar_divider =
+ *account_settings!(context[account_hash].listing.sidebar_divider);
+ self.sidebar_divider_theme = conf::value(context, "mail.sidebar_divider");
+ self.menu_content = CellBuffer::new_with_context(0, 0, None, context);
+ self.set_dirty(true);
+ }
UIEvent::Timer(n) if *n == self.menu_scrollbar_show_timer.id() => {
if self.show_menu_scrollbar == ShowMenuScrollbar::True {
self.show_menu_scrollbar = ShowMenuScrollbar::False;