1
0
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:
Henry Lin 2021-08-24 09:50:09 +08:00
parent 6e3d05c7ce
commit b8fe03b77f

View File

@ -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;