Skip to content

Commit

Permalink
✨ try even less frames
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed May 6, 2024
1 parent 0713d12 commit e270dbe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions taskin.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ func (task *Task) Progress(current, total int) {
func (r *Runners) Run() error {
program = tea.NewProgram(r, tea.WithInput(nil))
_, err := program.Run()

program.Send(spinner.TickMsg{})
return err
}

Expand All @@ -67,6 +65,7 @@ func New(tasks Tasks, cfg Config) Runners {

for _, runner := range runners[:i] {
if runner.State == Failed {
program.Send(spinner.TickMsg{})
return
}
}
Expand Down Expand Up @@ -99,16 +98,15 @@ func New(tasks Tasks, cfg Config) Runners {
for _, child := range runners[i].Children {
if child.State != Completed {
allChildrenCompleted = false
program.Send(spinner.TickMsg{})
break
}
}

// If all child tasks are completed, mark the parent task as completed
if allChildrenCompleted && runners[i].State != Failed {
runners[i].State = Completed
program.Send(spinner.TickMsg{})
}
program.Send(spinner.TickMsg{})
}
}()
return runners
Expand Down

0 comments on commit e270dbe

Please sign in to comment.