Fix initial pages being not rendered in max res

This commit is contained in:
2023-11-23 12:40:28 +01:00
parent 1a7f7498cd
commit 9240db298d
2 changed files with 6 additions and 6 deletions

View File

@ -253,6 +253,9 @@ where
// Besides the name, it is not in another thread
glib::spawn_future_local(async move {
while command_receiver.is_channel_open() {
// Add delay to tell gtk to give rendering priority
timeout_future(Duration::from_millis(1)).await;
if let Some(command) = command_receiver.receive_most_important_command() {
if let Some(response) = cache.process_command(command).unwrap_or_else(|e| {
error!("Error processing command: {}", e);
@ -264,9 +267,6 @@ where
debug!("receiver done");
}
}
// Add delay to tell gtk to give rendering priority
timeout_future(Duration::from_millis(1)).await;
}
});