mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Add forced refresh on GetAllUsableBeatmapSets()
This is commonly used in tests in a way where it's not feasible to guarantee correct results unless a refresh is called. This method shouldn't really be used outside of tests anyway, but that's for a folow-up effort.
This commit is contained in:
parent
81b5717ae7
commit
495636538f
@ -171,7 +171,11 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <returns>A list of available <see cref="BeatmapSetInfo"/>.</returns>
|
/// <returns>A list of available <see cref="BeatmapSetInfo"/>.</returns>
|
||||||
public List<BeatmapSetInfo> GetAllUsableBeatmapSets()
|
public List<BeatmapSetInfo> GetAllUsableBeatmapSets()
|
||||||
{
|
{
|
||||||
return contextFactory.Run(realm => realm.All<BeatmapSetInfo>().Where(b => !b.DeletePending).Detach());
|
return contextFactory.Run(realm =>
|
||||||
|
{
|
||||||
|
realm.Refresh();
|
||||||
|
return realm.All<BeatmapSetInfo>().Where(b => !b.DeletePending).Detach();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user