mirror of
https://github.com/ppy/osu
synced 2024-12-25 00:02:48 +00:00
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 @@ namespace osu.Game.Online
|
||||
|
||||
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 @@ namespace osu.Game.Overlays
|
||||
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
Block a user