1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 06:52:56 +08:00

Mark delegate value unused and add comment to avoid future regression

This commit is contained in:
Dean Herbert 2023-05-02 13:29:30 +09:00
parent 7cedbca9be
commit e808e7316b

View File

@ -242,7 +242,7 @@ namespace osu.Game.Overlays.Mods
if (AllowCustomisation)
((IBindable<IReadOnlyList<Mod>>)modSettingsArea.SelectedMods).BindTo(SelectedMods);
SelectedMods.BindValueChanged(val =>
SelectedMods.BindValueChanged(_ =>
{
updateMultiplier();
updateFromExternalSelection();
@ -252,6 +252,10 @@ namespace osu.Game.Overlays.Mods
if (AllowCustomisation)
{
// Importantly, use SelectedMods.Value here (and not the ValueChanged NewValue) as the latter can
// potentially be stale, due to complexities in the way change trackers work.
//
// See https://github.com/ppy/osu/pull/23284#issuecomment-1529056988
modSettingChangeTracker = new ModSettingChangeTracker(SelectedMods.Value);
modSettingChangeTracker.SettingChanged += _ => updateMultiplier();
}