mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Rename RealmContextFactory
to RealmAccess
This commit is contained in:
@ -47,15 +47,15 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
private SkinManager skins { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private RealmContextFactory realmFactory { get; set; }
|
||||
private RealmAccess realm { get; set; }
|
||||
|
||||
private IDisposable realmSubscription;
|
||||
|
||||
private IQueryable<SkinInfo> queryRealmSkins() =>
|
||||
realmFactory.Context.All<SkinInfo>()
|
||||
.Where(s => !s.DeletePending)
|
||||
.OrderByDescending(s => s.Protected) // protected skins should be at the top.
|
||||
.ThenBy(s => s.Name, StringComparer.OrdinalIgnoreCase);
|
||||
realm.Realm.All<SkinInfo>()
|
||||
.Where(s => !s.DeletePending)
|
||||
.OrderByDescending(s => s.Protected) // protected skins should be at the top.
|
||||
.ThenBy(s => s.Name, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuConfigManager config, [CanBeNull] SkinEditorOverlay skinEditor)
|
||||
@ -83,7 +83,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
|
||||
skinDropdown.Current = dropdownBindable;
|
||||
|
||||
realmSubscription = realmFactory.RegisterForNotifications(realm => queryRealmSkins(), (sender, changes, error) =>
|
||||
realmSubscription = realm.RegisterForNotifications(realm => queryRealmSkins(), (sender, changes, error) =>
|
||||
{
|
||||
// The first fire of this is a bit redundant due to the call below,
|
||||
// but this is safest in case the subscription is restored after a context recycle.
|
||||
@ -130,7 +130,7 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
{
|
||||
int protectedCount = queryRealmSkins().Count(s => s.Protected);
|
||||
|
||||
skinItems = queryRealmSkins().ToLive(realmFactory);
|
||||
skinItems = queryRealmSkins().ToLive(realm);
|
||||
|
||||
skinItems.Insert(protectedCount, random_skin_info);
|
||||
|
||||
|
Reference in New Issue
Block a user