mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-19 03:25:38 +00:00
ui: send only appropriate events to current view
This commit is contained in:
parent
499113acd2
commit
8e06e298ab
@ -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),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user