From 752403d70c851ece620c4007710062b158e8dec3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 25 Oct 2024 15:40:05 +0200 Subject: Split `Shell::request_redraw` into two different methods --- widget/src/pick_list.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'widget/src/pick_list.rs') diff --git a/widget/src/pick_list.rs b/widget/src/pick_list.rs index ec1c054f..9c9ba9e9 100644 --- a/widget/src/pick_list.rs +++ b/widget/src/pick_list.rs @@ -535,13 +535,11 @@ where if let Event::Window(window::Event::RedrawRequested(_now)) = event { self.last_status = Some(status); - } else { - match self.last_status { - Some(last_status) if last_status != status => { - shell.request_redraw(window::RedrawRequest::NextFrame); - } - _ => {} - } + } else if self + .last_status + .is_some_and(|last_status| last_status != status) + { + shell.request_redraw(); } event_status -- cgit