Automatically get DLC when selecting the DLL.

Automatically get DLC when getting a valid Steam app.
This commit is contained in:
Jeddunk 2021-01-04 12:54:28 +01:00
parent 721b5e8e7f
commit af8110e475

View File

@ -255,6 +255,7 @@ namespace auto_creamapi.ViewModels
var s = index > -1 ? strings[index] : null; var s = index > -1 ? strings[index] : null;
if (s != null) GameName = s; if (s != null) GameName = s;
await Search(); await Search();
await GetListOfDlc();
} }
Status = "Ready."; Status = "Ready.";
} }
@ -277,6 +278,7 @@ namespace auto_creamapi.ViewModels
} }
else else
{ {
MainWindowEnabled = false;
var navigate = _navigationService.Navigate<SearchResultViewModel, IEnumerable<SteamApp>, SteamApp>( var navigate = _navigationService.Navigate<SearchResultViewModel, IEnumerable<SteamApp>, SteamApp>(
_cache.GetListOfAppsByName(GameName)); _cache.GetListOfAppsByName(GameName));
await navigate; await navigate;
@ -287,11 +289,13 @@ namespace auto_creamapi.ViewModels
AppId = navigateResult.AppId; AppId = navigateResult.AppId;
} }
} }
await GetListOfDlc();
} }
else else
{ {
MyLogger.Log.Warning("Empty game name, cannot initiate search!"); MyLogger.Log.Warning("Empty game name, cannot initiate search!");
} }
MainWindowEnabled = true;
} }
private async Task GetListOfDlc() private async Task GetListOfDlc()