mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Fix filter failure when no collection is selected
This commit is contained in:
@ -31,20 +31,25 @@ namespace osu.Game.Overlays.Music
|
|||||||
|
|
||||||
foreach (var item in items.OfType<PlaylistItem>())
|
foreach (var item in items.OfType<PlaylistItem>())
|
||||||
{
|
{
|
||||||
var beatmapHashes = item.Model.Value.Beatmaps.Select(b => b.MD5Hash);
|
if (criteria.Collection == null)
|
||||||
|
item.InSelectedCollection = true;
|
||||||
bool contained = false;
|
else
|
||||||
|
|
||||||
foreach (string hash in beatmapHashes)
|
|
||||||
{
|
{
|
||||||
if (criteria.Collection?.Beatmaps.Contains(hash) == true)
|
var beatmapHashes = item.Model.Value.Beatmaps.Select(b => b.MD5Hash);
|
||||||
{
|
|
||||||
contained = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
item.InSelectedCollection = contained;
|
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;
|
items.SearchTerm = criteria.SearchText;
|
||||||
|
Reference in New Issue
Block a user