mirror of https://github.com/ppy/osu
Update `APIState` checks
This commit is contained in:
parent
167f5b4ef4
commit
7472dc9bb5
|
@ -3,6 +3,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
|
@ -79,10 +80,14 @@ private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule((
|
|||
|
||||
case APIState.Failing:
|
||||
case APIState.Connecting:
|
||||
case APIState.RequiresSecondFactorAuth:
|
||||
PopContentOut(Content);
|
||||
LoadingSpinner.Show();
|
||||
placeholder.FadeOut(transform_duration / 2, Easing.OutQuint);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
|
@ -118,12 +119,16 @@ private void apiStateChanged(ValueChangedEvent<APIState> state)
|
|||
break;
|
||||
|
||||
case APIState.Connecting:
|
||||
case APIState.RequiresSecondFactorAuth:
|
||||
break;
|
||||
|
||||
case APIState.Online:
|
||||
scheduledHide?.Cancel();
|
||||
scheduledHide = Schedule(Hide);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue