ui: send only appropriate events to current view

This commit is contained in:
Manos Pitsidianakis 2019-04-21 21:19:02 +03:00
parent 499113acd2
commit 8e06e298ab
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

View File

@ -746,9 +746,19 @@ impl Component for CompactListing {
self.views[self.cursor].refresh_mailbox(context); self.views[self.cursor].refresh_mailbox(context);
return true; return true;
} }
_ => { UIEvent::Resize
return self.views[self.cursor].process_event(event, context); | 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),
} }
} }