Skip to content

Commit

Permalink
- Adjusting Goal Overlay Widget so only the segment command OR the ge…
Browse files Browse the repository at this point in the history
…neric segment completed command is triggered and not both
  • Loading branch information
Matthew Olivo committed Oct 8, 2024
1 parent 4760e34 commit 9c24bdd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions MixItUp.Base/Model/Overlay/OverlayGoalV3Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using MixItUp.Base.ViewModel.User;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
Expand Down Expand Up @@ -325,8 +326,14 @@ public override async Task ProcessEvent(UserV2ViewModel user, double amount)
parameters.SpecialIdentifiers[NextSegmentNameSpecialIdentifier] = this.CurrentSegment.Name;
parameters.SpecialIdentifiers[NextSegmentAmountSpecialIdentifier] = this.CurrentSegment.Amount.ToString();

await ServiceManager.Get<CommandService>().Queue(this.SegmentCompletedCommandID, parameters);
await ServiceManager.Get<CommandService>().Queue(segment.CommandID, parameters);
if (ChannelSession.Settings.Commands.TryGetValue(segment.CommandID, out CommandModelBase command) && command.Actions.Count > 0)
{
await ServiceManager.Get<CommandService>().Queue(segment.CommandID, parameters);
}
else
{
await ServiceManager.Get<CommandService>().Queue(this.SegmentCompletedCommandID, parameters);
}
}
}
else
Expand Down

0 comments on commit 9c24bdd

Please sign in to comment.