mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Fix potential nullref in FilterControl during asynchronous load
This commit is contained in:
@ -66,24 +66,9 @@ namespace osu.Game.Screens.Select
|
|||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuColour colours, IBindable<RulesetInfo> parentRuleset, OsuConfigManager config)
|
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);
|
sortMode = config.GetBindable<SortMode>(OsuSetting.SongSelectSortingMode);
|
||||||
groupMode = config.GetBindable<GroupMode>(OsuSetting.SongSelectGroupingMode);
|
groupMode = config.GetBindable<GroupMode>(OsuSetting.SongSelectGroupingMode);
|
||||||
|
|
||||||
groupMode.BindValueChanged(_ => updateCriteria());
|
|
||||||
sortMode.BindValueChanged(_ => updateCriteria());
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
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 =>
|
collectionDropdown.Current.ValueChanged += val =>
|
||||||
{
|
{
|
||||||
if (val.NewValue == null)
|
if (val.NewValue == null)
|
||||||
|
Reference in New Issue
Block a user