mirror of
https://github.com/ppy/osu
synced 2024-12-25 08:12:41 +00:00
Update APIState
checks
This commit is contained in:
parent
167f5b4ef4
commit
7472dc9bb5
@ -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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user