From c734bf4e6cefbfa2c2d28832aab9f3051126ba03 Mon Sep 17 00:00:00 2001 From: snixtho Date: Sat, 5 Oct 2024 10:58:19 +0200 Subject: [PATCH] Don't start manual tracking if automatic tracking is enabled. --- .../Controllers/MatchTrackerEventController.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Modules/MatchTrackerModule/Controllers/MatchTrackerEventController.cs b/src/Modules/MatchTrackerModule/Controllers/MatchTrackerEventController.cs index 5ba23a519..ffa353ba7 100644 --- a/src/Modules/MatchTrackerModule/Controllers/MatchTrackerEventController.cs +++ b/src/Modules/MatchTrackerModule/Controllers/MatchTrackerEventController.cs @@ -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();