From 59d912e2eebfde2a9e57af6a242ee7b8952fddd2 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Tue, 7 May 2019 01:56:53 +0300 Subject: [PATCH] ui: send events to active subview only in CompactListing --- ui/src/components/mail/listing/compact.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/src/components/mail/listing/compact.rs b/ui/src/components/mail/listing/compact.rs index ecf86d9f5..46b403842 100644 --- a/ui/src/components/mail/listing/compact.rs +++ b/ui/src/components/mail/listing/compact.rs @@ -730,6 +730,7 @@ impl ListingTrait for CompactListing { } fn set_coordinates(&mut self, coordinates: (usize, usize, Option)) { self.views[self.cursor].new_cursor_pos = (coordinates.0, coordinates.1, 0); + self.views[self.cursor].unfocused = false; } } @@ -789,10 +790,7 @@ impl Component for CompactListing { | 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) } _ => return self.views[self.cursor].process_event(event, context), }