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

Make "featured artist" beatmap listing filter persist in config

This commit is contained in:
Salman Alshamrani 2024-12-21 17:22:07 -05:00
parent 1174f46656
commit 431d57a8a1
2 changed files with 10 additions and 0 deletions

View File

@ -57,6 +57,7 @@ namespace osu.Game.Configuration
SetDefault(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2f, 1f, 0.01f);
SetDefault(OsuSetting.BeatmapListingCardSize, BeatmapCardSize.Normal);
SetDefault(OsuSetting.BeatmapListingFeaturedArtistFilter, true);
SetDefault(OsuSetting.ProfileCoverExpanded, true);
@ -450,5 +451,6 @@ namespace osu.Game.Configuration
EditorAdjustExistingObjectsOnTimingChanges,
AlwaysRequireHoldingForPause,
MultiplayerShowInProgressFilter,
BeatmapListingFeaturedArtistFilter,
}
}

View File

@ -125,6 +125,9 @@ namespace osu.Game.Overlays.BeatmapListing
[Resolved]
private OsuColour colours { get; set; } = null!;
[Resolved]
private OsuConfigManager config { get; set; } = null!;
[Resolved]
private SessionStatics sessionStatics { get; set; } = null!;
@ -135,7 +138,12 @@ namespace osu.Game.Overlays.BeatmapListing
{
base.LoadComplete();
config.BindWith(OsuSetting.BeatmapListingFeaturedArtistFilter, Active);
disclaimerShown = sessionStatics.GetBindable<bool>(Static.FeaturedArtistDisclaimerShownOnce);
// no need to show the disclaimer if the user already had it toggled off in config.
if (!Active.Value)
disclaimerShown.Value = true;
}
protected override Color4 ColourNormal => colours.Orange1;