1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-15 17:47:18 +08:00

Merge pull request #21558 from peppy/fix-wrong-di

Fix incorrect resolution of `GameHost` in `LegacyImportManager`
This commit is contained in:
Dan Balasescu 2022-12-08 12:59:31 +09:00 committed by GitHub
commit 313f6e2f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,8 @@ namespace osu.Game.Database
[Resolved]
private RealmAccess realmAccess { get; set; } = null!;
[Resolved(canBeNull: true)] // canBeNull required while we remain on mono for mobile platforms.
private DesktopGameHost? desktopGameHost { get; set; }
[Resolved]
private GameHost gameHost { get; set; } = null!;
[Resolved]
private INotificationOverlay? notifications { get; set; }
@ -52,7 +52,7 @@ namespace osu.Game.Database
public bool SupportsImportFromStable => RuntimeInfo.IsDesktop;
public void UpdateStorage(string stablePath) => cachedStorage = new StableStorage(stablePath, desktopGameHost);
public void UpdateStorage(string stablePath) => cachedStorage = new StableStorage(stablePath, gameHost as DesktopGameHost);
public virtual async Task<int> GetImportCount(StableContent content, CancellationToken cancellationToken)
{