Fix various cases of creating realm contexts from update thread when not necessary

This commit is contained in:
Dean Herbert
2022-01-21 01:34:20 +09:00
parent 0c9eb3ad61
commit a5d2047f05
7 changed files with 36 additions and 37 deletions

View File

@ -165,8 +165,7 @@ namespace osu.Game.Stores
public override bool IsAvailableLocally(BeatmapSetInfo model)
{
using (var context = ContextFactory.CreateContext())
return context.All<BeatmapInfo>().Any(b => b.OnlineID == model.OnlineID);
return ContextFactory.Run(realm => realm.All<BeatmapInfo>().Any(b => b.OnlineID == model.OnlineID));
}
public override string HumanisedModelName => "beatmap";