Merge pull request #16626 from peppy/fix-skin-section-realm-usage

Refactor `SkinSection` to avoid unnecessary realm queries
This commit is contained in:
Dan Balasescu
2022-01-26 19:01:15 +09:00
committed by GitHub
2 changed files with 47 additions and 48 deletions

View File

@ -216,12 +216,6 @@ namespace osu.Game.Database
return new RealmLiveUnmanaged<T>(realmObject);
}
public static List<Live<T>> ToLive<T>(this IEnumerable<T> realmList, RealmAccess realm)
where T : RealmObject, IHasGuidPrimaryKey
{
return realmList.Select(l => new RealmLive<T>(l, realm)).Cast<Live<T>>().ToList();
}
public static Live<T> ToLive<T>(this T realmObject, RealmAccess realm)
where T : RealmObject, IHasGuidPrimaryKey
{