1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 07:33:15 +08:00

Unbind event on disposal

This commit is contained in:
Dan Balasescu 2024-12-13 16:39:16 +09:00
parent 62a1a5883a
commit 7bb1a5118e
No known key found for this signature in database

View File

@ -82,7 +82,8 @@ namespace osu.Game.Overlays.BeatmapListing
{
base.LoadComplete();
if (recommender != null) recommender.StarRatingUpdated += updateText;
if (recommender != null)
recommender.StarRatingUpdated += updateText;
Ruleset.BindValueChanged(_ => updateText(), true);
}
@ -102,6 +103,14 @@ namespace osu.Game.Overlays.BeatmapListing
else
Text.Text = Value.GetLocalisableDescription();
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
if (recommender != null)
recommender.StarRatingUpdated -= updateText;
}
}
private partial class FeaturedArtistsTabItem : MultipleSelectionFilterTabItem