mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Merge pull request #25139 from peppy/collection-ordering-fix
Fix collections not being sorted alphabetically in context menus
This commit is contained in:
commit
9cd33d9bb2
@ -500,7 +500,11 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
{
|
||||
if (beatmaps.QueryBeatmap(b => b.OnlineID == beatmap.OnlineID) is BeatmapInfo local && !local.BeatmapSet.AsNonNull().DeletePending)
|
||||
{
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>().AsEnumerable().Select(c => new CollectionToggleMenuItem(c.ToLive(realm), beatmap)).Cast<OsuMenuItem>().ToList();
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>()
|
||||
.OrderBy(c => c.Name)
|
||||
.AsEnumerable()
|
||||
.Select(c => new CollectionToggleMenuItem(c.ToLive(realm), beatmap)).Cast<OsuMenuItem>().ToList();
|
||||
|
||||
if (manageCollectionsDialog != null)
|
||||
collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show));
|
||||
|
||||
|
@ -233,7 +233,11 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
if (beatmapInfo.OnlineID > 0 && beatmapOverlay != null)
|
||||
items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => beatmapOverlay.FetchAndShowBeatmap(beatmapInfo.OnlineID)));
|
||||
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>().AsEnumerable().Select(c => new CollectionToggleMenuItem(c.ToLive(realm), beatmapInfo)).Cast<OsuMenuItem>().ToList();
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>()
|
||||
.OrderBy(c => c.Name)
|
||||
.AsEnumerable()
|
||||
.Select(c => new CollectionToggleMenuItem(c.ToLive(realm), beatmapInfo)).Cast<OsuMenuItem>().ToList();
|
||||
|
||||
if (manageCollectionsDialog != null)
|
||||
collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show));
|
||||
|
||||
|
@ -225,7 +225,12 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
if (beatmapSet.OnlineID > 0 && viewDetails != null)
|
||||
items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => viewDetails(beatmapSet.OnlineID)));
|
||||
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>().AsEnumerable().Select(createCollectionMenuItem).ToList();
|
||||
var collectionItems = realm.Realm.All<BeatmapCollection>()
|
||||
.OrderBy(c => c.Name)
|
||||
.AsEnumerable()
|
||||
.Select(createCollectionMenuItem)
|
||||
.ToList();
|
||||
|
||||
if (manageCollectionsDialog != null)
|
||||
collectionItems.Add(new OsuMenuItem("Manage...", MenuItemType.Standard, manageCollectionsDialog.Show));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user