mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Fix potential nullref in FilterControl during asynchronous load
This commit is contained in:
parent
71f32a2e37
commit
3c70b3127c
@ -66,24 +66,9 @@ namespace osu.Game.Screens.Select
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuColour colours, IBindable<RulesetInfo> parentRuleset, OsuConfigManager config)
|
||||
{
|
||||
config.BindWith(OsuSetting.ShowConvertedBeatmaps, showConverted);
|
||||
showConverted.ValueChanged += _ => updateCriteria();
|
||||
|
||||
config.BindWith(OsuSetting.DisplayStarsMinimum, minimumStars);
|
||||
minimumStars.ValueChanged += _ => updateCriteria();
|
||||
|
||||
config.BindWith(OsuSetting.DisplayStarsMaximum, maximumStars);
|
||||
maximumStars.ValueChanged += _ => updateCriteria();
|
||||
|
||||
ruleset.BindTo(parentRuleset);
|
||||
ruleset.BindValueChanged(_ => updateCriteria());
|
||||
|
||||
sortMode = config.GetBindable<SortMode>(OsuSetting.SongSelectSortingMode);
|
||||
groupMode = config.GetBindable<GroupMode>(OsuSetting.SongSelectGroupingMode);
|
||||
|
||||
groupMode.BindValueChanged(_ => updateCriteria());
|
||||
sortMode.BindValueChanged(_ => updateCriteria());
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
@ -182,6 +167,21 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
};
|
||||
|
||||
config.BindWith(OsuSetting.ShowConvertedBeatmaps, showConverted);
|
||||
showConverted.ValueChanged += _ => updateCriteria();
|
||||
|
||||
config.BindWith(OsuSetting.DisplayStarsMinimum, minimumStars);
|
||||
minimumStars.ValueChanged += _ => updateCriteria();
|
||||
|
||||
config.BindWith(OsuSetting.DisplayStarsMaximum, maximumStars);
|
||||
maximumStars.ValueChanged += _ => updateCriteria();
|
||||
|
||||
ruleset.BindTo(parentRuleset);
|
||||
ruleset.BindValueChanged(_ => updateCriteria());
|
||||
|
||||
groupMode.BindValueChanged(_ => updateCriteria());
|
||||
sortMode.BindValueChanged(_ => updateCriteria());
|
||||
|
||||
collectionDropdown.Current.ValueChanged += val =>
|
||||
{
|
||||
if (val.NewValue == null)
|
||||
|
Loading…
Reference in New Issue
Block a user