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/radio.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'widget/src/radio.rs') diff --git a/widget/src/radio.rs b/widget/src/radio.rs index 714d4fb5..ed821532 100644 --- a/widget/src/radio.rs +++ b/widget/src/radio.rs @@ -360,13 +360,11 @@ where if let Event::Window(window::Event::RedrawRequested(_now)) = event { self.last_status = Some(current_status); - } else { - match self.last_status { - Some(status) if status != current_status => { - shell.request_redraw(window::RedrawRequest::NextFrame); - } - _ => {} - } + } else if self + .last_status + .is_some_and(|last_status| last_status != current_status) + { + shell.request_redraw(); } event::Status::Ignored -- cgit