Add locate stable button / screen

This commit is contained in:
Dean Herbert
2022-05-16 21:07:42 +09:00
parent 1593f05ff3
commit 4af1a788d1
3 changed files with 136 additions and 7 deletions

View File

@ -50,6 +50,8 @@ namespace osu.Game.Database
public bool SupportsImportFromStable => RuntimeInfo.IsDesktop;
public void UpdateStorage(string stablePath) => cachedStorage = new StableStorage(stablePath, desktopGameHost);
public async Task<int> GetImportCount(StableContent content, CancellationToken cancellationToken)
{
var stableStorage = GetCurrentStableStorage();
@ -91,7 +93,8 @@ namespace osu.Game.Database
Schedule(() => dialogOverlay.Push(new StableDirectoryLocationDialog(taskCompletionSource)));
string stablePath = await taskCompletionSource.Task.ConfigureAwait(false);
stableStorage = cachedStorage = new StableStorage(stablePath, desktopGameHost);
UpdateStorage(stablePath);
stableStorage = GetCurrentStableStorage();
}
var importTasks = new List<Task>();