diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsOverlay.cs index 9e0b0c4548..789d2ad9ae 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneRankingsOverlay.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsOverlay.cs @@ -62,13 +62,18 @@ namespace osu.Game.Tests.Visual.Online [Test] public void TestPageSelection() { - AddStep("Set score to performance", () => scope.Value = RankingsScope.Performance); + AddStep("Set scope to performance", () => scope.Value = RankingsScope.Performance); AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1); AddStep("Switch to another scope", () => scope.Value = RankingsScope.Score); AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0); AddStep("Move to next page", () => rankingsOverlay.Header.CurrentPage.Value += 1); AddStep("Switch to another ruleset", () => rankingsOverlay.Header.Ruleset.Value = new ManiaRuleset().RulesetInfo); AddAssert("Check page is first one", () => rankingsOverlay.Header.CurrentPage.Value == 0); + + AddStep("Set scope to kudosu", () => scope.Value = RankingsScope.Kudosu); + AddAssert("Check available pages is 20", () => rankingsOverlay.Header.AvailablesPages.Value == 20); + AddStep("Set scope to performance", () => scope.Value = RankingsScope.Performance); + AddAssert("Check available pages is 200", () => rankingsOverlay.Header.AvailablesPages.Value == 200); } private void loadRankingsOverlay() diff --git a/osu.Game/Overlays/RankingsOverlay.cs b/osu.Game/Overlays/RankingsOverlay.cs index 1a8b410424..f1e0ed6572 100644 --- a/osu.Game/Overlays/RankingsOverlay.cs +++ b/osu.Game/Overlays/RankingsOverlay.cs @@ -86,6 +86,9 @@ namespace osu.Game.Overlays if (Header.Current.Value != RankingsScope.Performance) Country.SetDefault(); + // Kudosu scope have only 20 fetchable pages. + Header.AvailablesPages.Value = tab == RankingsScope.Kudosu ? 20 : 200; + // Hide page selection for spotlights scope Header.ShowPageSelector(tab != RankingsScope.Spotlights);