Skip to content

Commit

Permalink
Don't start manual tracking if automatic tracking is enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
snixtho committed Oct 5, 2024
1 parent af73895 commit c734bf4
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ public Task OnBeginMatchAsync(object sender, EventArgs args)
}

[Subscribe(FlowControlEvent.MatchStarted)]
public Task OnMatchStarted(object sender, EventArgs args) => tracker.BeginMatchAsync();
public Task OnMatchStarted(object sender, EventArgs args)
{
if (settings.AutomaticTracking)
{
return Task.CompletedTask;
}

return tracker.BeginMatchAsync();
}

[Subscribe(FlowControlEvent.MatchEnded)]
public Task OnMatchEnded(object sender, EventArgs args) => tracker.EndMatchAsync();
Expand Down

0 comments on commit c734bf4

Please sign in to comment.