feat: fix connection cascade failure, add auto-recovery for all drivers
This commit is contained in:
1 parent
c9ab2fb60a
commit
92d3f64eae
9 files changed
+590
-269
No files matched your search
@@ -8,7 +8,6 @@ use commands::connection::AppState;
|
||||
use dbx_core::storage::{DesktopIconTheme, DesktopSettings, Storage};
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
#[cfg(target_os = "macos")]
|
||||
use tauri::RunEvent;
|
||||
use tauri::{
|
||||
menu::MenuBuilder,
|
||||
@@ -700,5 +699,14 @@ pub fn run() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if let RunEvent::Resumed = &event {
|
||||
let app_handle = app_handle.clone();
|
||||
tauri::async_runtime::spawn(async move {
|
||||
if let Some(state) = app_handle.try_state::<AppState>() {
|
||||
state.refresh_connections().await;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user