From e3f8bc05883e126e176d6b12e54e0df39c85003a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 24 Mar 2022 17:14:51 +0900 Subject: [PATCH] Revert `Availability` to `private` --- .../Screens/OnlinePlay/Components/ReadyButton.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Components/ReadyButton.cs b/osu.Game/Screens/OnlinePlay/Components/ReadyButton.cs index 79cf5c7236..cdaa39d2be 100644 --- a/osu.Game/Screens/OnlinePlay/Components/ReadyButton.cs +++ b/osu.Game/Screens/OnlinePlay/Components/ReadyButton.cs @@ -14,18 +14,20 @@ namespace osu.Game.Screens.OnlinePlay.Components public abstract class ReadyButton : TriangleButton, IHasTooltip { public new readonly BindableBool Enabled = new BindableBool(); - protected readonly IBindable Availability = new Bindable(); + + private readonly IBindable availability = new Bindable(); [BackgroundDependencyLoader] private void load(OnlinePlayBeatmapAvailabilityTracker beatmapTracker) { - Availability.BindTo(beatmapTracker.Availability); - Availability.BindValueChanged(_ => updateState()); + availability.BindTo(beatmapTracker.Availability); + + availability.BindValueChanged(_ => updateState()); Enabled.BindValueChanged(_ => updateState(), true); } private void updateState() => - base.Enabled.Value = Availability.Value.State == DownloadState.LocallyAvailable && Enabled.Value; + base.Enabled.Value = availability.Value.State == DownloadState.LocallyAvailable && Enabled.Value; public virtual LocalisableString TooltipText { @@ -34,7 +36,7 @@ namespace osu.Game.Screens.OnlinePlay.Components if (Enabled.Value) return string.Empty; - if (Availability.Value.State != DownloadState.LocallyAvailable) + if (availability.Value.State != DownloadState.LocallyAvailable) return "Beatmap not downloaded"; return string.Empty;