added configureawait false to achievement method
This commit is contained in:
parent
6518361824
commit
99786a0c36
@ -13,7 +13,6 @@ namespace GoldbergGUI.Core
|
||||
.EndingWith("Service")
|
||||
.AsInterfaces()
|
||||
.RegisterAsLazySingleton();
|
||||
//RegisterAppStart<MainViewModel>();
|
||||
RegisterCustomAppStart<CustomMvxAppStart<MainViewModel>>();
|
||||
}
|
||||
}
|
||||
|
@ -327,8 +327,8 @@ namespace GoldbergGUI.Core.Services
|
||||
|
||||
foreach (var achievement in c.Achievements)
|
||||
{
|
||||
await DownloadImageAsync(imagePath, achievement.Icon);
|
||||
await DownloadImageAsync(imagePath, achievement.IconGray);
|
||||
await DownloadImageAsync(imagePath, achievement.Icon).ConfigureAwait(false);
|
||||
await DownloadImageAsync(imagePath, achievement.IconGray).ConfigureAwait(false);
|
||||
|
||||
// Update achievement list to point to local images instead
|
||||
achievement.Icon = $"images/{Path.GetFileName(achievement.Icon)}";
|
||||
@ -698,7 +698,7 @@ namespace GoldbergGUI.Core.Services
|
||||
}
|
||||
|
||||
var wc = new System.Net.WebClient();
|
||||
await wc.DownloadFileTaskAsync(new Uri(imageUrl, UriKind.Absolute), targetPath);
|
||||
await wc.DownloadFileTaskAsync(new Uri(imageUrl, UriKind.Absolute), targetPath).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
@ -184,7 +184,7 @@ namespace GoldbergGUI.Core.Services
|
||||
client.DefaultRequestHeaders.UserAgent.ParseAdd(UserAgent);
|
||||
var apiUrl = $"{GameSchemaUrl}?key={Secrets.SteamWebApiKey()}&appid={steamApp.AppId}&l=en";
|
||||
|
||||
var response = await client.GetAsync(apiUrl);
|
||||
var response = await client.GetAsync(apiUrl).ConfigureAwait(false);
|
||||
var responseBody = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
var jsonResponse = JsonDocument.Parse(responseBody);
|
||||
|
@ -259,7 +259,7 @@ namespace GoldbergGUI.Core.ViewModels
|
||||
{
|
||||
_selectedLanguage = value;
|
||||
RaisePropertyChanged(() => SelectedLanguage);
|
||||
//MyLogger.Log.Debug($"Lang: {value}");
|
||||
//_log.LogDebug($"Lang: {value}");
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,7 +391,7 @@ namespace GoldbergGUI.Core.ViewModels
|
||||
|
||||
MainWindowEnabled = false;
|
||||
StatusText = "Trying to get list of achievements...";
|
||||
var listOfAchievements = await _steam.GetListOfAchievements(new SteamApp { AppId = AppId, Name = GameName });
|
||||
var listOfAchievements = await _steam.GetListOfAchievements(new SteamApp { AppId = AppId, Name = GameName }).ConfigureAwait(false);
|
||||
Achievements = new MvxObservableCollection<Achievement>(listOfAchievements);
|
||||
MainWindowEnabled = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user