Merge pull request #16850 from frenzibyte/readonly-pinned-scores

Add read-only pinned scores view in user profile overlay
This commit is contained in:
Dan Balasescu 2022-02-11 16:15:46 +09:00 committed by GitHub
commit 43f1044987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 4 deletions

View File

@ -51,7 +51,7 @@
<Reference Include="Java.Interop" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.210.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.204.0" />
</ItemGroup>
<ItemGroup Label="Transitive Dependencies">

View File

@ -39,6 +39,7 @@ namespace osu.Game.Online.API.Requests
{
Best,
Firsts,
Recent
Recent,
Pinned
}
}

View File

@ -151,6 +151,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"scores_recent_count")]
public int ScoresRecentCount;
[JsonProperty(@"scores_pinned_count")]
public int ScoresPinnedCount;
[JsonProperty(@"beatmap_playcounts_count")]
public int BeatmapPlayCountsCount;

View File

@ -46,6 +46,9 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
case ScoreType.Recent:
return user.ScoresRecentCount;
case ScoreType.Pinned:
return user.ScoresPinnedCount;
default:
return 0;
}

View File

@ -18,6 +18,7 @@ namespace osu.Game.Overlays.Profile.Sections
{
Children = new[]
{
new PaginatedScoreContainer(ScoreType.Pinned, User, UsersStrings.ShowExtraTopRanksPinnedTitle),
new PaginatedScoreContainer(ScoreType.Best, User, UsersStrings.ShowExtraTopRanksBestTitle),
new PaginatedScoreContainer(ScoreType.Firsts, User, UsersStrings.ShowExtraTopRanksFirstTitle)
};

View File

@ -37,7 +37,7 @@
</PackageReference>
<PackageReference Include="Realm" Version="10.8.0" />
<PackageReference Include="ppy.osu.Framework" Version="2022.204.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.210.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
<PackageReference Include="Sentry" Version="3.13.0" />
<PackageReference Include="SharpCompress" Version="0.30.1" />
<PackageReference Include="NUnit" Version="3.13.2" />

View File

@ -61,7 +61,7 @@
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.204.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.210.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.211.0" />
</ItemGroup>
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
<PropertyGroup>