Run mundy inside Runtime context in iced_winit

This commit is contained in:
Héctor Ramón Jiménez 2025-10-16 02:43:29 +02:00
parent fe009142cf
commit 0b78f2aa5d
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -540,12 +540,15 @@ async fn run_instance<P>(
.boxed(), .boxed(),
); );
mundy::Preferences::once_blocking( runtime
mundy::Interest::ColorScheme, .enter(|| {
core::time::Duration::from_millis(200), mundy::Preferences::once_blocking(
) mundy::Interest::ColorScheme,
.map(|preferences| to_mode(preferences.color_scheme)) core::time::Duration::from_millis(200),
.unwrap_or_default() )
})
.map(|preferences| to_mode(preferences.color_scheme))
.unwrap_or_default()
}; };
#[cfg(not(all(feature = "linux-theme-detection", target_os = "linux")))] #[cfg(not(all(feature = "linux-theme-detection", target_os = "linux")))]