ui: send only appropriate events to current view

embed
Manos Pitsidianakis 2019-04-21 21:19:02 +03:00
parent 499113acd2
commit 8e06e298ab
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 12 additions and 2 deletions

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),
} }
} }