1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Fix ScoreDownloadTracker matching on empty hash equality

This commit is contained in:
Dean Herbert 2022-04-12 18:01:13 +09:00
parent 45d79c1a73
commit b51abfc722

View File

@ -47,7 +47,10 @@ namespace osu.Game.Online
Downloader.DownloadBegan += downloadBegan;
Downloader.DownloadFailed += downloadFailed;
realmSubscription = realm.RegisterForNotifications(r => r.All<ScoreInfo>().Where(s => ((s.OnlineID > 0 && s.OnlineID == TrackedItem.OnlineID) || s.Hash == TrackedItem.Hash) && !s.DeletePending), (items, changes, ___) =>
realmSubscription = realm.RegisterForNotifications(r => r.All<ScoreInfo>().Where(s =>
((s.OnlineID > 0 && s.OnlineID == TrackedItem.OnlineID)
|| (!string.IsNullOrEmpty(s.Hash) && s.Hash == TrackedItem.Hash))
&& !s.DeletePending), (items, changes, ___) =>
{
if (items.Any())
Schedule(() => UpdateState(DownloadState.LocallyAvailable));