mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 15:43:21 +08:00
Use Mod.Equals
for comparison
This commit is contained in:
parent
6e3d05c7ce
commit
b8fe03b77f
@ -80,16 +80,16 @@ namespace osu.Game.Overlays.Mods
|
||||
protected override void PopIn() => this.FadeIn(200, Easing.OutQuint);
|
||||
protected override void PopOut() => this.FadeOut(200, Easing.OutQuint);
|
||||
|
||||
private string lastMod;
|
||||
private Mod lastMod;
|
||||
|
||||
public bool SetContent(object content)
|
||||
{
|
||||
if (!(content is Mod mod))
|
||||
return false;
|
||||
|
||||
if (mod.Acronym == lastMod) return true;
|
||||
if (mod.Equals(lastMod)) return true;
|
||||
|
||||
lastMod = mod.Acronym;
|
||||
lastMod = mod;
|
||||
|
||||
descriptionText.Text = mod.Description;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user