Skip to content

TargetTrigger.onStart doesn’t unpause → trigger never fires after restart #1290

@moeidabbasi

Description

@moeidabbasi

Description

In TargetTrigger.onStart(Scope what, Workout s), the method resets internal state but doesn’t clear the paused flag.
If the same trigger instance was paused or stopped earlier, it remains paused after restart — preventing any trigger actions from firing.

File / Code

File: app/src/main/org/runnerup/workout/TargetTrigger.java

@Override
public void onStart(Scope what, Workout s) {
  if (this.scope == what) {
    reset();
    for (Feedback f : triggerAction) {
      f.onStart(s);
    }
  }
}

Steps to Reproduce

  1. Create a TargetTrigger and let it run.
  2. Call onPause() or onStop() (sets paused = true).
  3. Call onStart(...) again.
  4. Observe that no actions are fired during subsequent ticks.

Expected Behavior

onStart should clear paused to resume normal operation.

Actual Behavior

paused remains true, so no trigger actions occur after restarting.

Impact

Trigger never activates after being paused or stopped, affecting pacing or HR feedback.

Proposed Fix

Add this line at the start of the method:

paused = false;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions