Split Shell::request_redraw into two different methods

This commit is contained in:
Héctor Ramón Jiménez 2024-10-25 15:40:05 +02:00
parent 7fbc195b11
commit 752403d70c
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F
15 changed files with 89 additions and 114 deletions

View file

@ -366,13 +366,8 @@ where
if let Event::Window(window::Event::RedrawRequested(_now)) = event {
self.status = Some(current_status);
} else {
match self.status {
Some(status) if status != current_status => {
shell.request_redraw(window::RedrawRequest::NextFrame);
}
_ => {}
}
} else if self.status.is_some_and(|status| status != current_status) {
shell.request_redraw();
}
update_status