fix: resolve crashes when exiting lightweight mode by ensuring async window operations
This commit is contained in:
@@ -34,12 +34,12 @@ async fn open_or_close_dashboard_internal(bypass_debounce: bool) {
|
||||
log::info!(target: "app", "Currently in lightweight mode, exiting lightweight mode");
|
||||
crate::module::lightweight::exit_lightweight_mode().await;
|
||||
log::info!(target: "app", "Creating new window after exiting lightweight mode");
|
||||
let result = WindowManager::show_main_window();
|
||||
let result = WindowManager::show_main_window().await;
|
||||
log::info!(target: "app", "Window operation result: {result:?}");
|
||||
return;
|
||||
}
|
||||
|
||||
let result = WindowManager::toggle_main_window();
|
||||
let result = WindowManager::toggle_main_window().await;
|
||||
log::info!(target: "app", "Window toggle result: {result:?}");
|
||||
return;
|
||||
}
|
||||
@@ -47,12 +47,12 @@ async fn open_or_close_dashboard_internal(bypass_debounce: bool) {
|
||||
log::info!(target: "app", "Currently in lightweight mode, exiting lightweight mode");
|
||||
crate::module::lightweight::exit_lightweight_mode().await;
|
||||
log::info!(target: "app", "Creating new window after exiting lightweight mode");
|
||||
let result = WindowManager::show_main_window();
|
||||
let result = WindowManager::show_main_window().await;
|
||||
log::info!(target: "app", "Window operation result: {result:?}");
|
||||
return;
|
||||
}
|
||||
|
||||
let result = WindowManager::toggle_main_window();
|
||||
let result = WindowManager::toggle_main_window().await;
|
||||
log::info!(target: "app", "Window toggle result: {result:?}");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user