mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Change CollectionManager
to only store MD5 hashes instead of full BeatmapInfo
This commit is contained in:
@ -245,7 +245,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
TernaryState state;
|
||||
|
||||
int countExisting = beatmapSet.Beatmaps.Count(b => collection.Beatmaps.Contains(b));
|
||||
int countExisting = beatmapSet.Beatmaps.Count(b => collection.Beatmaps.Contains(b.MD5Hash));
|
||||
|
||||
if (countExisting == beatmapSet.Beatmaps.Count)
|
||||
state = TernaryState.True;
|
||||
@ -261,14 +261,14 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
switch (s)
|
||||
{
|
||||
case TernaryState.True:
|
||||
if (collection.Beatmaps.Contains(b))
|
||||
if (collection.Beatmaps.Contains(b.MD5Hash))
|
||||
continue;
|
||||
|
||||
collection.Beatmaps.Add(b);
|
||||
collection.Beatmaps.Add(b.MD5Hash);
|
||||
break;
|
||||
|
||||
case TernaryState.False:
|
||||
collection.Beatmaps.Remove(b);
|
||||
collection.Beatmaps.Remove(b.MD5Hash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user