feat: add update interval

This commit is contained in:
GyDi authored and GitHub committed 2022-04-21 14:26:41 +08:00
1 parent 0c23fe96be
commit cb3b51dcde
4 files changed
+39 -8

No files matched your search

+5 -1
View File
@@ -112,8 +112,12 @@ pub fn delete_profile(index: String, core: State<'_, Core>) -> CmdResult {
#[tauri::command]
pub fn patch_profile(index: String, profile: PrfItem, core: State<'_, Core>) -> CmdResult {
let mut profiles = core.profiles.lock();
wrap_err!(profiles.patch_item(index, profile))?;
drop(profiles);
wrap_err!(profiles.patch_item(index, profile))
// update cron task
let mut timer = core.timer.lock();
wrap_err!(timer.refresh())
}
/// run vscode command to edit the profile