mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Split out realm portion of RulesetStore
This commit is contained in:
@ -22,6 +22,7 @@ using osu.Framework.Logging;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Formats;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
@ -109,7 +110,7 @@ namespace osu.Game
|
||||
|
||||
protected SkinManager SkinManager { get; private set; }
|
||||
|
||||
protected RulesetStore RulesetStore { get; private set; }
|
||||
protected RealmRulesetStore RulesetStore { get; private set; }
|
||||
|
||||
protected RealmKeyBindingStore KeyBindingStore { get; private set; }
|
||||
|
||||
@ -200,9 +201,11 @@ namespace osu.Game
|
||||
|
||||
dependencies.Cache(realm = new RealmAccess(Storage, "client", EFContextFactory));
|
||||
|
||||
dependencies.Cache(RulesetStore = new RulesetStore(realm, Storage));
|
||||
dependencies.CacheAs<RulesetStore>(RulesetStore = new RealmRulesetStore(realm, Storage));
|
||||
dependencies.CacheAs<IRulesetStore>(RulesetStore);
|
||||
|
||||
Decoder.RegisterDependencies(RulesetStore);
|
||||
|
||||
// Backup is taken here rather than in EFToRealmMigrator to avoid recycling realm contexts
|
||||
// after initial usages below. It can be moved once a direction is established for handling re-subscription.
|
||||
// See https://github.com/ppy/osu/pull/16547 for more discussion.
|
||||
|
Reference in New Issue
Block a user