From cb62d3d4b9528336b0a8a950a05cb7f0b271851a Mon Sep 17 00:00:00 2001 From: Sebastian Krajewski Date: Wed, 30 Mar 2022 01:09:05 +0200 Subject: [PATCH] Remove skin dependency as component is reinitialized on skin change --- osu.Game/Screens/Play/HUD/LegacyComboCounter.cs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs b/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs index 07dd42e173..eaca623e39 100644 --- a/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs +++ b/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs @@ -44,9 +44,6 @@ namespace osu.Game.Screens.Play.HUD private readonly Container counterContainer; - [Resolved] - private ISkinSource skin { get; set; } - /// /// Hides the combo counter internally without affecting its . /// @@ -135,8 +132,6 @@ namespace osu.Game.Screens.Play.HUD Current.BindValueChanged(combo => updateCount(combo.NewValue == 0), true); - // Since layout depends on combo font height we need to update it during skin change - skin.SourceChanged += updateLayout; updateLayout(); } @@ -292,13 +287,5 @@ namespace osu.Game.Screens.Play.HUD double difference = currentValue > newValue ? currentValue - newValue : newValue - currentValue; return difference * rolling_duration; } - - protected override void Dispose(bool isDisposing) - { - base.Dispose(isDisposing); - - if (skin != null) - skin.SourceChanged -= updateLayout; - } } }