public async ValueTask LoadSkinAsync(Account account) { if (account.AuthMode == AuthMode.Offline) { return; } _logService.Info(nameof(AccountService), $"Loading skin for {account.AuthMode} account \"{account.Username}\""); account.Skin = await _skinService.GetAsync(account.Profile); if (account.Profile == null) { await RefreshSkinAsync(account); } else { RefreshSkinAsync(account).ConfigureAwait(false); } }
private async Task LoadAvatars(string profileServer) { IsLoading = true; for (int i = 0; i < Profiles.Count; i++) { Profiles[i].Base64Profile = await _accountService.GetProfileAsync(Profiles[i].Id, profileServer); Profiles[i].Skin = await _skinService.GetAsync(Profiles[i].Base64Profile); } Profiles.Refresh(); IsLoading = false; }