Remove unnecessary content private storage

This commit is contained in:
Dean Herbert
2020-02-14 15:29:50 +09:00
parent b86b5e9adb
commit 4d5abab2ee

View File

@ -21,8 +21,7 @@ namespace osu.Game.Online
protected const double TRANSFORM_TIME = 300.0; protected const double TRANSFORM_TIME = 300.0;
private readonly Container viewContent; protected override Container<Drawable> Content { get; }
protected override Container<Drawable> Content => viewContent;
[Resolved] [Resolved]
protected IAPIProvider API { get; private set; } protected IAPIProvider API { get; private set; }
@ -31,7 +30,7 @@ namespace osu.Game.Online
{ {
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
viewContent = new Container Content = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
@ -48,21 +47,21 @@ namespace osu.Game.Online
switch (state) switch (state)
{ {
case APIState.Offline: case APIState.Offline:
PopContentOut(viewContent); PopContentOut(Content);
placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * TRANSFORM_TIME, Easing.OutQuint); placeholder.ScaleTo(0.8f).Then().ScaleTo(1, 3 * TRANSFORM_TIME, Easing.OutQuint);
placeholder.FadeInFromZero(2 * TRANSFORM_TIME, Easing.OutQuint); placeholder.FadeInFromZero(2 * TRANSFORM_TIME, Easing.OutQuint);
LoadingAnimation.Hide(); LoadingAnimation.Hide();
break; break;
case APIState.Online: case APIState.Online:
PopContentIn(viewContent); PopContentIn(Content);
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint); placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
LoadingAnimation.Hide(); LoadingAnimation.Hide();
break; break;
case APIState.Failing: case APIState.Failing:
case APIState.Connecting: case APIState.Connecting:
PopContentOut(viewContent); PopContentOut(Content);
LoadingAnimation.Show(); LoadingAnimation.Show();
placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint); placeholder.FadeOut(TRANSFORM_TIME / 2, Easing.OutQuint);
break; break;