Skip to content

Commit

Permalink
fix(error): auto-start setting failing
Browse files Browse the repository at this point in the history
  • Loading branch information
eythaann committed Jan 16, 2025
1 parent 75a0c6c commit 54b105f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/background/seelen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,10 @@ impl Seelen {
Com::run_with_context(|| unsafe {
let task_service: ITaskService = Com::create_instance(&TaskScheduler)?;
task_service.Connect(None, None, None, None)?;
let folder = task_service.GetFolder(&"\\Seelen".into())?;
Ok(folder.GetTask(&"Seelen UI App".into()).is_ok())
let is_task_enabled = task_service
.GetFolder(&"\\Seelen".into())
.is_ok_and(|folder| folder.GetTask(&"Seelen UI App".into()).is_ok());
Ok(is_task_enabled)
})
}

Expand Down

0 comments on commit 54b105f

Please sign in to comment.