From c64e8f31786ec504452be73dab67bd8cba5737a8 Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Thu, 18 Apr 2024 13:37:37 -0400 Subject: [PATCH] Force the update loop to continue even when the program is in the background --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index ddf45ca..4176b2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,12 +89,6 @@ impl eframe::App for JpmmvApp egui::RichText::new(format!("album: {}", self.current_metadata.album)) .color(egui::Color32::from_rgb(180, 180, 180))); - // ui.label(format!("{}", self.current_metadata.name)); - // ui.label(format!("by: {}", self.current_metadata.artist)); - // ui.label(format!("album: {}", self.current_metadata.album)); - - // ui.label(format!("Image URI: {}", self.current_metadata.art_url.clone())); - ui.add_space(20.0); ui.style_mut().text_styles.insert( @@ -111,5 +105,8 @@ impl eframe::App for JpmmvApp }); }); }); + + // Force update calls even when the program is in the background + ctx.request_repaint_after(Duration::from_millis(100)); } }