1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Merge pull request #1589 from Aergwyn/fix-reload-all-panels

Fix osu!direct download reloading all panels
This commit is contained in:
Dan Balasescu 2017-11-27 10:06:21 +09:00 committed by GitHub
commit d20277f734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -234,7 +234,7 @@ namespace osu.Game.Overlays.BeatmapSet
private void handleBeatmapAdd(BeatmapSetInfo beatmap)
{
if (beatmap.OnlineBeatmapSetID == BeatmapSet.OnlineBeatmapSetID)
if (beatmap.OnlineBeatmapSetID == BeatmapSet?.OnlineBeatmapSetID)
downloadButtonsContainer.FadeOut(transition_duration);
}

View File

@ -50,7 +50,7 @@ namespace osu.Game.Overlays
{
if (beatmapSets?.Equals(value) ?? false) return;
beatmapSets = value;
beatmapSets = value?.ToList();
if (beatmapSets == null) return;
@ -65,8 +65,6 @@ namespace osu.Game.Overlays
}
ResultAmounts = new ResultCounts(distinctCount(artists), distinctCount(songs), distinctCount(tags));
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
}
}
@ -282,7 +280,11 @@ namespace osu.Game.Overlays
var sets = response.Select(r => r.ToBeatmapSet(rulesets)).Where(b => !presentOnlineIds.Contains(b.OnlineBeatmapSetID)).ToList();
// may not need scheduling; loads async internally.
Schedule(() => BeatmapSets = sets);
Schedule(() =>
{
BeatmapSets = sets;
recreatePanels(Filter.DisplayStyleControl.DisplayStyle.Value);
});
});
};