Run mundy inside Runtime context in iced_winit
This commit is contained in:
parent
fe009142cf
commit
0b78f2aa5d
1 changed files with 9 additions and 6 deletions
|
|
@ -540,12 +540,15 @@ async fn run_instance<P>(
|
|||
.boxed(),
|
||||
);
|
||||
|
||||
mundy::Preferences::once_blocking(
|
||||
mundy::Interest::ColorScheme,
|
||||
core::time::Duration::from_millis(200),
|
||||
)
|
||||
.map(|preferences| to_mode(preferences.color_scheme))
|
||||
.unwrap_or_default()
|
||||
runtime
|
||||
.enter(|| {
|
||||
mundy::Preferences::once_blocking(
|
||||
mundy::Interest::ColorScheme,
|
||||
core::time::Duration::from_millis(200),
|
||||
)
|
||||
})
|
||||
.map(|preferences| to_mode(preferences.color_scheme))
|
||||
.unwrap_or_default()
|
||||
};
|
||||
|
||||
#[cfg(not(all(feature = "linux-theme-detection", target_os = "linux")))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue