From 8e06e298ab965ea99882f0550f0e140d49fb2e83 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 21 Apr 2019 21:19:02 +0300 Subject: [PATCH] ui: send only appropriate events to current view --- ui/src/components/mail/listing/compact.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/src/components/mail/listing/compact.rs b/ui/src/components/mail/listing/compact.rs index 7975676d..89b6c3bd 100644 --- a/ui/src/components/mail/listing/compact.rs +++ b/ui/src/components/mail/listing/compact.rs @@ -746,9 +746,19 @@ impl Component for CompactListing { self.views[self.cursor].refresh_mailbox(context); return true; } - _ => { - return self.views[self.cursor].process_event(event, context); + UIEvent::Resize + | UIEvent::MailboxUpdate(_) + | UIEvent::ComponentKill(_) + | UIEvent::StartupCheck(_) + | UIEvent::EnvelopeUpdate(_) + | UIEvent::EnvelopeRename(_, _, _) + | UIEvent::EnvelopeRemove(_) => { + return self + .views + .iter_mut() + .fold(false, |acc, v| acc || v.process_event(event, context)); } + _ => return self.views[self.cursor].process_event(event, context), } }