Skip to content

Commit

Permalink
- Adding $goalprogressremaining Special Identifier for Goal Overlay W…
Browse files Browse the repository at this point in the history
…idget
  • Loading branch information
Matthew Olivo committed Nov 21, 2024
1 parent acb71af commit 354aa86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions MixItUp.Base/Model/Overlay/OverlayGoalV3Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class OverlayGoalV3Model : OverlayEventCountingV3ModelBase

public const string TotalAmountSpecialIdentifier = "goaltotalamount";
public const string ProgressAmountSpecialIdentifier = "goalprogressamount";
public const string RemainingAmountSpecialIdentifier = "goalprogressremaining";
public const string SegmentNameSpecialIdentifier = "goalsegmentname";
public const string SegmentAmountSpecialIdentifier = "goalsegmentamount";
public const string NextSegmentNameSpecialIdentifier = "goalnextsegmentname";
Expand Down Expand Up @@ -339,6 +340,7 @@ public override async Task ProcessEvent(UserV2ViewModel user, double amount)
CommandParametersModel parameters = new CommandParametersModel(user);
parameters.SpecialIdentifiers[TotalAmountSpecialIdentifier] = this.CurrentAmount.ToString();
parameters.SpecialIdentifiers[ProgressAmountSpecialIdentifier] = amount.ToString();
parameters.SpecialIdentifiers[RemainingAmountSpecialIdentifier] = (this.CurrentAmount - amount).ToString();
parameters.SpecialIdentifiers[SegmentNameSpecialIdentifier] = segment.Name;
parameters.SpecialIdentifiers[SegmentAmountSpecialIdentifier] = segment.Amount.ToString();
parameters.SpecialIdentifiers[NextSegmentNameSpecialIdentifier] = this.CurrentSegment.Name;
Expand Down

0 comments on commit 354aa86

Please sign in to comment.