File tree 1 file changed +6
-8
lines changed
osu.Game/Graphics/Backgrounds
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -38,21 +38,19 @@ public class SeasonalBackgroundLoader : Component
38
38
private void load ( OsuConfigManager config , SessionStatics sessionStatics )
39
39
{
40
40
seasonalBackgroundMode = config . GetBindable < SeasonalBackgroundMode > ( OsuSetting . SeasonalBackgroundMode ) ;
41
- seasonalBackgroundMode . BindValueChanged ( _ => triggerSeasonalBackgroundChanged ( ) ) ;
41
+ seasonalBackgroundMode . BindValueChanged ( _ => SeasonalBackgroundChanged ? . Invoke ( ) ) ;
42
42
43
43
seasonalBackgrounds = sessionStatics . GetBindable < APISeasonalBackgrounds > ( Static . SeasonalBackgrounds ) ;
44
- seasonalBackgrounds . BindValueChanged ( _ => triggerSeasonalBackgroundChanged ( ) ) ;
44
+ seasonalBackgrounds . BindValueChanged ( _ =>
45
+ {
46
+ if ( shouldShowSeasonal )
47
+ SeasonalBackgroundChanged ? . Invoke ( ) ;
48
+ } ) ;
45
49
46
50
apiState . BindTo ( api . State ) ;
47
51
apiState . BindValueChanged ( fetchSeasonalBackgrounds , true ) ;
48
52
}
49
53
50
- private void triggerSeasonalBackgroundChanged ( )
51
- {
52
- if ( shouldShowSeasonal )
53
- SeasonalBackgroundChanged ? . Invoke ( ) ;
54
- }
55
-
56
54
private void fetchSeasonalBackgrounds ( ValueChangedEvent < APIState > stateChanged )
57
55
{
58
56
if ( seasonalBackgrounds . Value != null || stateChanged . NewValue != APIState . Online )
You can’t perform that action at this time.
0 commit comments