1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Merge pull request #18627 from Joehuu/always-show-mod-selector-beatmap-info

Always show mod selector on beatmap info leaderboards regardless of supporter
This commit is contained in:
Dan Balasescu 2022-06-09 18:18:12 +09:00 committed by GitHub
commit bc7262a3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 12 deletions

View File

@ -18,13 +18,10 @@ using APIUser = osu.Game.Online.API.Requests.Responses.APIUser;
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestSceneBeatmapSetOverlay : OsuTestScene
{
private readonly TestBeatmapSetOverlay overlay;
protected override bool UseOnlineAPI => true;
private int nextBeatmapSetId = 1;
public TestSceneBeatmapSetOverlay()
@ -41,12 +38,6 @@ namespace osu.Game.Tests.Visual.Online
AddStep(@"show loading", () => overlay.ShowBeatmapSet(null));
}
[Test]
public void TestOnline()
{
AddStep(@"show online", () => overlay.FetchAndShowBeatmapSet(55));
}
[Test]
public void TestLocalBeatmaps()
{
@ -107,6 +98,7 @@ namespace osu.Game.Tests.Visual.Online
AddAssert("status is loved", () => overlay.ChildrenOfType<BeatmapSetOnlineStatusPill>().Single().Status == BeatmapOnlineStatus.Loved);
AddAssert("scores container is visible", () => overlay.ChildrenOfType<ScoresContainer>().Single().Alpha == 1);
AddAssert("mod selector is visible", () => overlay.ChildrenOfType<LeaderboardModSelector>().Single().Alpha == 1);
AddStep("go to second beatmap", () => overlay.ChildrenOfType<BeatmapPicker.DifficultySelectorButton>().ElementAt(1).TriggerClick());

View File

@ -0,0 +1,26 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Online
{
public class TestSceneOnlineBeatmapSetOverlay : OsuTestScene
{
private readonly BeatmapSetOverlay overlay;
protected override bool UseOnlineAPI => true;
public TestSceneOnlineBeatmapSetOverlay()
{
Add(overlay = new BeatmapSetOverlay());
}
[Test]
public void TestOnline()
{
AddStep(@"show online", () => overlay.FetchAndShowBeatmapSet(55));
}
}
}

View File

@ -242,8 +242,6 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
modSelector.DeselectAll();
else
getScores();
modSelector.FadeTo(userIsSupporter ? 1 : 0);
}
private void getScores()
@ -260,7 +258,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
return;
}
if (scope.Value != BeatmapLeaderboardScope.Global && !userIsSupporter)
if ((scope.Value != BeatmapLeaderboardScope.Global || modSelector.SelectedMods.Count > 0) && !userIsSupporter)
{
Scores = null;
notSupporterPlaceholder.Show();