Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
[CalculatorViewModel] Changing active mods instantly updates PP values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyrrrz committed Aug 28, 2016
1 parent ae5cd75 commit f72de38
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions OsuHelper/ViewModels/CalculatorViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public EnabledMods Mods
RaisePropertyChanged(() => HrEnabled);
RaisePropertyChanged(() => DtEnabled);
RaisePropertyChanged(() => HdEnabled);
TryUpdate();
}
}

Expand Down Expand Up @@ -139,10 +140,7 @@ public double ExpectedAccuracy
{
Set(ref _expectedAccuracy, value);
RaisePropertyChanged(() => ExpectedAccuracyString);
if (CanUpdate)
Update();
else
_updateQueued = true;
TryUpdate();
}
}

Expand Down Expand Up @@ -265,6 +263,14 @@ private async void Update()
CanUpdate = true;
}

private void TryUpdate()
{
if (CanUpdate)
Update();
else
_updateQueued = true;
}

public void Dispose()
{
_webClient.Dispose();
Expand Down

0 comments on commit f72de38

Please sign in to comment.