1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-20 07:57:20 +08:00

Overwrite IBindable<ReadOnlyList<Mod>> cache in BeatmapSetOverlay

Implement fix as suggested
This commit is contained in:
Adam Baker 2022-07-22 23:15:24 -05:00
parent d451bc8fda
commit 06462c13dd

@ -3,7 +3,10 @@
#nullable disable #nullable disable
using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
@ -12,6 +15,7 @@ using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays.BeatmapSet; using osu.Game.Overlays.BeatmapSet;
using osu.Game.Overlays.BeatmapSet.Scores; using osu.Game.Overlays.BeatmapSet.Scores;
using osu.Game.Overlays.Comments; using osu.Game.Overlays.Comments;
using osu.Game.Rulesets.Mods;
using osuTK; using osuTK;
using osuTK.Graphics; using osuTK.Graphics;
@ -25,6 +29,10 @@ namespace osu.Game.Overlays
private readonly Bindable<APIBeatmapSet> beatmapSet = new Bindable<APIBeatmapSet>(); private readonly Bindable<APIBeatmapSet> beatmapSet = new Bindable<APIBeatmapSet>();
[Cached]
[Cached(typeof(IBindable<IReadOnlyList<Mod>>))]
protected readonly Bindable<IReadOnlyList<Mod>> SelectedMods = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
public BeatmapSetOverlay() public BeatmapSetOverlay()
: base(OverlayColourScheme.Blue) : base(OverlayColourScheme.Blue)
{ {