mirror of
https://github.com/nekename/OpenDeck.git
synced 2026-10-28 09:44:01 +00:00
fix: clear screens of plugin-registered devices on exit (#454)
Co-authored-by: nekename <63245705+nekename@users.noreply.github.com>
This commit is contained in:
1 parent
ca78774c62
commit
542f6c9271
1 file changed
+11
-1
+11
-1
@@ -391,8 +391,18 @@ If you have already donated, thank you so much for your support!"#,
|
||||
|
||||
app.run(|app, event| {
|
||||
if let tauri::RunEvent::Exit = event {
|
||||
futures::executor::block_on(async {
|
||||
let device_ids = shared::DEVICES.iter().filter(|entry| !entry.id.starts_with("sd-")).map(|entry| entry.id.clone()).collect::<Vec<_>>();
|
||||
for id in device_ids {
|
||||
let _ = events::outbound::devices::clear_screen(id).await;
|
||||
}
|
||||
});
|
||||
|
||||
#[cfg(windows)]
|
||||
futures::executor::block_on(plugins::deactivate_plugins());
|
||||
{
|
||||
std::thread::sleep(std::time::Duration::from_millis(750));
|
||||
futures::executor::block_on(plugins::deactivate_plugins());
|
||||
}
|
||||
|
||||
let flush_future = store::profiles::flush_stale_profiles();
|
||||
match futures::executor::block_on(flush_future) {
|
||||
|
||||
Reference in new issue
Block a user