mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Merge pull request #16826 from smoogipoo/fix-beatmap-availability-check
Fix comparison leading to incorrect beatmap availabilities
This commit is contained in:
commit
2dcb726581
@ -92,7 +92,8 @@ namespace osu.Game.Tests.Online
|
|||||||
|
|
||||||
AddStep("allow importing", () => beatmaps.AllowImport.SetResult(true));
|
AddStep("allow importing", () => beatmaps.AllowImport.SetResult(true));
|
||||||
AddUntilStep("wait for import", () => beatmaps.CurrentImport != null);
|
AddUntilStep("wait for import", () => beatmaps.CurrentImport != null);
|
||||||
addAvailabilityCheckStep("state locally available", BeatmapAvailability.LocallyAvailable);
|
AddAssert("ensure beatmap available", () => beatmaps.IsAvailableLocally(testBeatmapSet));
|
||||||
|
addAvailabilityCheckStep("state is locally available", BeatmapAvailability.LocallyAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -165,7 +165,7 @@ namespace osu.Game.Stores
|
|||||||
|
|
||||||
public override bool IsAvailableLocally(BeatmapSetInfo model)
|
public override bool IsAvailableLocally(BeatmapSetInfo model)
|
||||||
{
|
{
|
||||||
return Realm.Run(realm => realm.All<BeatmapInfo>().Any(b => b.OnlineID == model.OnlineID));
|
return Realm.Run(realm => realm.All<BeatmapSetInfo>().Any(s => s.OnlineID == model.OnlineID));
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string HumanisedModelName => "beatmap";
|
public override string HumanisedModelName => "beatmap";
|
||||||
|
Loading…
Reference in New Issue
Block a user