1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-18 20:22:58 +08:00

Disable ability to toggle "featured artists" beatmap listing filter in iOS

This commit is contained in:
Salman Alshamrani 2024-12-22 07:50:08 -05:00
parent c24f690019
commit 589e187a80
2 changed files with 18 additions and 0 deletions

View File

@ -220,6 +220,12 @@ namespace osu.Game
private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>(); private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();
/// <summary>
/// Whether the game should be limited from providing access to download non-featured-artist beatmaps.
/// This only affects the "featured artists" filter in the beatmap listing overlay.
/// </summary>
public bool LimitedToFeaturedArtists => RuntimeInfo.OS == RuntimeInfo.Platform.iOS && true;
public OsuGame(string[] args = null) public OsuGame(string[] args = null)
{ {
this.args = args; this.args = args;

View File

@ -125,6 +125,9 @@ namespace osu.Game.Overlays.BeatmapListing
[Resolved] [Resolved]
private OsuColour colours { get; set; } = null!; private OsuColour colours { get; set; } = null!;
[Resolved]
private OsuGame game { get; set; } = null!;
[Resolved] [Resolved]
private OsuConfigManager config { get; set; } = null!; private OsuConfigManager config { get; set; } = null!;
@ -144,6 +147,12 @@ namespace osu.Game.Overlays.BeatmapListing
// no need to show the disclaimer if the user already had it toggled off in config. // no need to show the disclaimer if the user already had it toggled off in config.
if (!Active.Value) if (!Active.Value)
disclaimerShown.Value = true; disclaimerShown.Value = true;
if (game.LimitedToFeaturedArtists)
{
Enabled.Value = false;
Active.Disabled = true;
}
} }
protected override Color4 ColourNormal => colours.Orange1; protected override Color4 ColourNormal => colours.Orange1;
@ -151,6 +160,9 @@ namespace osu.Game.Overlays.BeatmapListing
protected override bool OnClick(ClickEvent e) protected override bool OnClick(ClickEvent e)
{ {
if (!Enabled.Value)
return true;
if (!disclaimerShown.Value && dialogOverlay != null) if (!disclaimerShown.Value && dialogOverlay != null)
{ {
dialogOverlay.Push(new FeaturedArtistConfirmDialog(() => dialogOverlay.Push(new FeaturedArtistConfirmDialog(() =>