Rename KudosuValue to count and remove pointless local storage

This commit is contained in:
Dean Herbert 2017-11-23 17:37:02 +09:00
parent 6d9951d9af
commit 30db2ce18a

View File

@ -64,8 +64,8 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
this.user.ValueChanged += newUser => this.user.ValueChanged += newUser =>
{ {
total.KudosuValue = newUser?.Kudosu.Total ?? 0; total.Count = newUser?.Kudosu.Total ?? 0;
avaliable.KudosuValue = newUser?.Kudosu.Available ?? 0; avaliable.Count = newUser?.Kudosu.Available ?? 0;
}; };
} }
@ -77,18 +77,9 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
private readonly OsuSpriteText valueText; private readonly OsuSpriteText valueText;
private int kudosuValue; public int Count
public int KudosuValue
{ {
get { return kudosuValue; } set { valueText.Text = value.ToString(); }
set
{
if (kudosuValue == value)
return;
kudosuValue = value;
valueText.Text = kudosuValue.ToString();
}
} }
public CountSection(string header, string description) public CountSection(string header, string description)