feat: fix connection cascade failure, add auto-recovery for all drivers

This commit is contained in:
dbin0123 authored and GitHub committed 2026-06-19 23:06:21 +08:00
1 parent c9ab2fb60a
commit 92d3f64eae
9 files changed
+590 -269

No files matched your search

+9 -1
View File
@@ -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;
}
});
}
});
}