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:
parent
62a1a5883a
commit
7bb1a5118e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user