mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:17:26 +08:00
Fix SeasonalBackgroundLoader
triggering a background reload when not providing backgrounds
This commit is contained in:
parent
0d25b63769
commit
b83073c2e9
@ -41,7 +41,11 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
seasonalBackgroundMode.BindValueChanged(_ => SeasonalBackgroundChanged?.Invoke());
|
seasonalBackgroundMode.BindValueChanged(_ => SeasonalBackgroundChanged?.Invoke());
|
||||||
|
|
||||||
seasonalBackgrounds = sessionStatics.GetBindable<APISeasonalBackgrounds>(Static.SeasonalBackgrounds);
|
seasonalBackgrounds = sessionStatics.GetBindable<APISeasonalBackgrounds>(Static.SeasonalBackgrounds);
|
||||||
seasonalBackgrounds.BindValueChanged(_ => SeasonalBackgroundChanged?.Invoke());
|
seasonalBackgrounds.BindValueChanged(response =>
|
||||||
|
{
|
||||||
|
if (response.NewValue?.Backgrounds?.Count > 0)
|
||||||
|
SeasonalBackgroundChanged?.Invoke();
|
||||||
|
});
|
||||||
|
|
||||||
apiState.BindTo(api.State);
|
apiState.BindTo(api.State);
|
||||||
apiState.BindValueChanged(fetchSeasonalBackgrounds, true);
|
apiState.BindValueChanged(fetchSeasonalBackgrounds, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user