mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Change CollectionManager
to only store MD5 hashes instead of full BeatmapInfo
This commit is contained in:
@ -30,7 +30,22 @@ namespace osu.Game.Overlays.Music
|
||||
var items = (SearchContainer<RearrangeableListItem<Live<BeatmapSetInfo>>>)ListContainer;
|
||||
|
||||
foreach (var item in items.OfType<PlaylistItem>())
|
||||
item.InSelectedCollection = criteria.Collection?.Beatmaps.Any(b => item.Model.ID == b.BeatmapSet?.ID) ?? true;
|
||||
{
|
||||
var beatmapHashes = item.Model.Value.Beatmaps.Select(b => b.MD5Hash);
|
||||
|
||||
bool contained = false;
|
||||
|
||||
foreach (string hash in beatmapHashes)
|
||||
{
|
||||
if (criteria.Collection?.Beatmaps.Contains(hash) == true)
|
||||
{
|
||||
contained = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
item.InSelectedCollection = contained;
|
||||
}
|
||||
|
||||
items.SearchTerm = criteria.SearchText;
|
||||
}
|
||||
|
Reference in New Issue
Block a user