mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Add basic ordering
This commit is contained in:
parent
094ddecc95
commit
d363a5d164
@ -98,5 +98,14 @@ namespace osu.Game.Collections
|
||||
public string Name;
|
||||
|
||||
public readonly BindableList<BeatmapInfo> Beatmaps = new BindableList<BeatmapInfo>();
|
||||
|
||||
public DateTimeOffset LastModifyTime { get; private set; }
|
||||
|
||||
public BeatmapCollection()
|
||||
{
|
||||
LastModifyTime = DateTimeOffset.UtcNow;
|
||||
|
||||
Beatmaps.CollectionChanged += (_, __) => LastModifyTime = DateTimeOffset.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
items.Add(new OsuMenuItem("Add to...")
|
||||
{
|
||||
Items = collectionManager.Collections.Take(3).Select(createCollectionMenuItem)
|
||||
Items = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem)
|
||||
.Append(new OsuMenuItem("More...", MenuItemType.Standard, () => { }))
|
||||
.ToArray()
|
||||
});
|
||||
|
@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
items.Add(new OsuMenuItem("Add all to...")
|
||||
{
|
||||
Items = collectionManager.Collections.Take(3).Select(createCollectionMenuItem)
|
||||
Items = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem)
|
||||
.Append(new OsuMenuItem("More...", MenuItemType.Standard, () => { }))
|
||||
.ToArray()
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user