mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:42:56 +08:00
Fix OnlinePlayBeatmapAvailabilityTracker
not correctly tracking beatmap import changes
This commit is contained in:
parent
b531cd0207
commit
c15efaeff2
@ -71,7 +71,7 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
AddInternal(downloadTracker);
|
||||
|
||||
downloadTracker.State.BindValueChanged(_ => updateAvailability(), true);
|
||||
downloadTracker.State.BindValueChanged(_ => Scheduler.AddOnce(updateAvailability), true);
|
||||
downloadTracker.Progress.BindValueChanged(_ =>
|
||||
{
|
||||
if (downloadTracker.State.Value != DownloadState.Downloading)
|
||||
@ -85,14 +85,14 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
realmSubscription?.Dispose();
|
||||
realmSubscription = realmContextFactory.Context
|
||||
.All<BeatmapSetInfo>()
|
||||
.Where(s => s.OnlineID == item.NewValue.BeatmapID) // TODO: figure out if we need this hash match in the subscription || s.ID == matchingHash?.ID)
|
||||
.All<BeatmapInfo>()
|
||||
.Where(b => b.OnlineID == item.NewValue.BeatmapID && b.MD5Hash == item.NewValue.Beatmap.Value.MD5Hash)
|
||||
.QueryAsyncWithNotifications((items, changes, ___) =>
|
||||
{
|
||||
if (changes == null)
|
||||
return;
|
||||
|
||||
Schedule(updateAvailability);
|
||||
Scheduler.AddOnce(updateAvailability);
|
||||
});
|
||||
}, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user