General refactorings

This commit is contained in:
smoogipoo
2020-09-07 21:08:48 +09:00
parent c1d255a04c
commit 98e9c4dc25
10 changed files with 95 additions and 40 deletions

View File

@ -52,7 +52,7 @@ namespace osu.Game.Screens.Select.Carousel
private BeatmapCollectionManager collectionManager { get; set; }
[Resolved(CanBeNull = true)]
private ManageCollectionDialog manageCollectionDialog { get; set; }
private ManageCollectionsDialog manageCollectionsDialog { get; set; }
private IBindable<StarDifficulty> starDifficultyBindable;
private CancellationTokenSource starDifficultyCancellationSource;
@ -227,9 +227,9 @@ namespace osu.Game.Screens.Select.Carousel
if (beatmap.OnlineBeatmapID.HasValue && beatmapOverlay != null)
items.Add(new OsuMenuItem("Details", MenuItemType.Standard, () => beatmapOverlay.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value)));
var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem).ToList();
if (manageCollectionDialog != null)
collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionDialog.Show));
var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyDate).Take(3).Select(createCollectionMenuItem).ToList();
if (manageCollectionsDialog != null)
collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionsDialog.Show));
items.Add(new OsuMenuItem("Add to...") { Items = collectionItems });