mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-26 02:27:14 +00:00
fix: address codebase review issues
- refactor(backend): use tokio::sync::Mutex for DbState and update commands to async - fix(backend): remove unconditional post-queue system action in scheduler - refactor(backend): remove dead WebSocket aria2 progress loop - fix(backend): use character count for deep link payload length check - fix(backend): implement dynamic port fallback for extension server - build(backend): apply macos codesigning step for release builds - security(backend): add explicitly defined Content-Security-Policy - fix(frontend): replace pause_download API call with remove_download for file cleanup - fix(frontend): resolve bug ignoring 0% progress reporting - fix(frontend): append instead of overwrite deep link URLs when Add Modal is open - style(frontend): append standard .dark class for dark mode themes - style(frontend): remove ghost row layout hack from download table - build: decouple typescript binding generation from build step
This commit is contained in:
@@ -12,7 +12,7 @@ pub fn spawn_scheduler(app_handle: tauri::AppHandle) {
|
||||
|
||||
let settings_opt = {
|
||||
let state = app_handle.state::<crate::db::DbState>();
|
||||
let conn = state.conn.lock().unwrap();
|
||||
let conn = state.conn.lock().await;
|
||||
crate::db::get_settings(&conn).unwrap_or(None)
|
||||
};
|
||||
|
||||
@@ -46,7 +46,7 @@ pub fn spawn_scheduler(app_handle: tauri::AppHandle) {
|
||||
|
||||
if let Ok(updated) = serde_json::to_string(&settings) {
|
||||
let state = app_handle.state::<crate::db::DbState>();
|
||||
let conn = state.conn.lock().unwrap();
|
||||
let conn = state.conn.lock().await;
|
||||
let _ = crate::db::save_settings(&conn, &updated);
|
||||
}
|
||||
}
|
||||
@@ -59,13 +59,9 @@ pub fn spawn_scheduler(app_handle: tauri::AppHandle) {
|
||||
|
||||
if let Ok(updated) = serde_json::to_string(&settings) {
|
||||
let state = app_handle.state::<crate::db::DbState>();
|
||||
let conn = state.conn.lock().unwrap();
|
||||
let conn = state.conn.lock().await;
|
||||
let _ = crate::db::save_settings(&conn, &updated);
|
||||
}
|
||||
|
||||
if !matches!(scheduler.post_queue_action, crate::ipc::PostQueueAction::None) {
|
||||
let _ = crate::execute_system_action(scheduler.post_queue_action.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user