mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:47:46 +08:00
Merge branch 'master' into 2fa-not-verifying-via-link
This commit is contained in:
commit
19fe3a15f3
@ -10,7 +10,7 @@
|
||||
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2024.130.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2024.131.0" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Fody does not handle Android build well, and warns when unchanged.
|
||||
|
@ -128,19 +128,12 @@ namespace osu.Game.Online.API
|
||||
// if we already have a valid access token, let's use it.
|
||||
if (accessTokenValid) return true;
|
||||
|
||||
// we want to ensure only a single authentication update is happening at once.
|
||||
lock (access_token_retrieval_lock)
|
||||
{
|
||||
// re-check if valid, in case another request completed and revalidated our access.
|
||||
if (accessTokenValid) return true;
|
||||
// if not, let's try using our refresh token to request a new access token.
|
||||
if (!string.IsNullOrEmpty(Token.Value?.RefreshToken))
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
AuthenticateWithRefresh(Token.Value.RefreshToken);
|
||||
|
||||
// if not, let's try using our refresh token to request a new access token.
|
||||
if (!string.IsNullOrEmpty(Token.Value?.RefreshToken))
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
AuthenticateWithRefresh(Token.Value.RefreshToken);
|
||||
|
||||
return accessTokenValid;
|
||||
}
|
||||
return accessTokenValid;
|
||||
}
|
||||
|
||||
private bool accessTokenValid => Token.Value?.IsValid ?? false;
|
||||
@ -149,14 +142,18 @@ namespace osu.Game.Online.API
|
||||
|
||||
internal string RequestAccessToken()
|
||||
{
|
||||
if (!ensureAccessToken()) return null;
|
||||
lock (access_token_retrieval_lock)
|
||||
{
|
||||
if (!ensureAccessToken()) return null;
|
||||
|
||||
return Token.Value.AccessToken;
|
||||
return Token.Value.AccessToken;
|
||||
}
|
||||
}
|
||||
|
||||
internal void Clear()
|
||||
{
|
||||
Token.Value = null;
|
||||
lock (access_token_retrieval_lock)
|
||||
Token.Value = null;
|
||||
}
|
||||
|
||||
private class AccessTokenRequestRefresh : AccessTokenRequest
|
||||
|
@ -132,7 +132,18 @@ namespace osu.Game.Screens.Play
|
||||
if (string.IsNullOrEmpty(exception.Message))
|
||||
Logger.Error(exception, "Failed to retrieve a score submission token.");
|
||||
else
|
||||
Logger.Log($"You are not able to submit a score: {exception.Message}", level: LogLevel.Important);
|
||||
{
|
||||
switch (exception.Message)
|
||||
{
|
||||
case "expired token":
|
||||
Logger.Log("Score submission failed because your system clock is set incorrectly. Please check your system time, date and timezone.", level: LogLevel.Important);
|
||||
break;
|
||||
|
||||
default:
|
||||
Logger.Log($"You are not able to submit a score: {exception.Message}", level: LogLevel.Important);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
|
@ -46,6 +46,7 @@ namespace osu.Game.Skinning
|
||||
const double fade_out_length = 600;
|
||||
|
||||
this.FadeInFromZero(fade_in_length);
|
||||
this.Delay(fade_out_delay).FadeOut(fade_out_length);
|
||||
|
||||
// legacy judgements don't play any transforms if they are an animation.... UNLESS they are the temporary displayed judgement from new piece.
|
||||
if (animation?.FrameCount > 1 && !forceTransforms)
|
||||
@ -79,8 +80,6 @@ namespace osu.Game.Skinning
|
||||
this.RotateTo(0);
|
||||
this.RotateTo(rotation, fade_in_length)
|
||||
.Then().RotateTo(rotation * 2, fade_out_delay + fade_out_length - fade_in_length, Easing.In);
|
||||
|
||||
this.Delay(fade_out_delay).FadeOut(fade_out_length);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -94,8 +93,6 @@ namespace osu.Game.Skinning
|
||||
// so we need to force the current value to be correct at 1.2 (0.95) then complete the
|
||||
// second half of the transform.
|
||||
.ScaleTo(0.95f).ScaleTo(finalScale, fade_in_length * 0.2f); // t = 1.4
|
||||
|
||||
this.Delay(fade_out_delay).FadeOut(fade_out_length);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Realm" Version="11.5.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2024.130.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2024.131.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2024.129.0" />
|
||||
<PackageReference Include="Sentry" Version="3.41.3" />
|
||||
<!-- Held back due to 0.34.0 failing AOT compilation on ZstdSharp.dll dependency. -->
|
||||
|
@ -23,6 +23,6 @@
|
||||
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2024.130.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2024.131.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user