From f96f7e696d73f507ea87ad8b952defe5c79bf4cd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 14 Nov 2017 18:53:09 +0900 Subject: [PATCH] Tidy up variables a bit --- .../Beatmaps/PaginatedBeatmapContainer.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs b/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs index aec345e4d8..4840341f2f 100644 --- a/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs +++ b/osu.Game/Overlays/Profile/Sections/Beatmaps/PaginatedBeatmapContainer.cs @@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps private readonly BeatmapSetType type; - private DirectPanel playing; + private DirectPanel currentlyPlaying; public PaginatedBeatmapContainer(BeatmapSetType type, Bindable user, string header, string missing) : base(user, header, missing) @@ -55,14 +55,14 @@ namespace osu.Game.Overlays.Profile.Sections.Beatmaps var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets)) { Width = 400 }; ItemsContainer.Add(panel); - panel.PreviewPlaying.ValueChanged += newValue => + panel.PreviewPlaying.ValueChanged += isPlaying => { - if (newValue) - { - if (playing != null && playing != panel) - playing.PreviewPlaying.Value = false; - playing = panel; - } + if (!isPlaying) return; + + if (currentlyPlaying != null && currentlyPlaying != panel) + currentlyPlaying.PreviewPlaying.Value = false; + + currentlyPlaying = panel; }; } };