mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-08 10:23:29 +00:00
fix: resolve scheduler infinite loop and frozen delete modal bugs
This commit is contained in:
@@ -35,8 +35,10 @@ pub fn spawn_scheduler(app_handle: tauri::AppHandle) {
|
||||
state.insert("schedulerLastStartKey".to_string(), serde_json::json!(key));
|
||||
state.insert("schedulerRunning".to_string(), serde_json::json!(true));
|
||||
});
|
||||
|
||||
let _ = app_handle.emit("schedule-trigger", "start");
|
||||
let _ = app_handle.emit("schedule-trigger", serde_json::json!({
|
||||
"action": "start",
|
||||
"key": key
|
||||
}));
|
||||
}
|
||||
|
||||
if scheduler.stop_time_enabled
|
||||
@@ -48,8 +50,10 @@ pub fn spawn_scheduler(app_handle: tauri::AppHandle) {
|
||||
state.insert("schedulerLastStopKey".to_string(), serde_json::json!(key));
|
||||
state.insert("schedulerRunning".to_string(), serde_json::json!(false));
|
||||
});
|
||||
|
||||
let _ = app_handle.emit("schedule-trigger", "stop");
|
||||
let _ = app_handle.emit("schedule-trigger", serde_json::json!({
|
||||
"action": "stop",
|
||||
"key": key
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user