Update APIState checks

This commit is contained in:
Dean Herbert 2023-11-16 20:39:23 +09:00
parent 167f5b4ef4
commit 7472dc9bb5
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#nullable disable #nullable disable
using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
@ -79,10 +80,14 @@ namespace osu.Game.Online
case APIState.Failing: case APIState.Failing:
case APIState.Connecting: case APIState.Connecting:
case APIState.RequiresSecondFactorAuth:
PopContentOut(Content); PopContentOut(Content);
LoadingSpinner.Show(); LoadingSpinner.Show();
placeholder.FadeOut(transform_duration / 2, Easing.OutQuint); placeholder.FadeOut(transform_duration / 2, Easing.OutQuint);
break; break;
default:
throw new ArgumentOutOfRangeException();
} }
}); });

View File

@ -3,6 +3,7 @@
#nullable disable #nullable disable
using System;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
@ -118,12 +119,16 @@ namespace osu.Game.Overlays
break; break;
case APIState.Connecting: case APIState.Connecting:
case APIState.RequiresSecondFactorAuth:
break; break;
case APIState.Online: case APIState.Online:
scheduledHide?.Cancel(); scheduledHide?.Cancel();
scheduledHide = Schedule(Hide); scheduledHide = Schedule(Hide);
break; break;
default:
throw new ArgumentOutOfRangeException();
} }
} }
} }