public async Task Refresh(int p = -1) { if (string.IsNullOrEmpty(SettingsHelper.Get <string>(SettingsHelper.Uid))) { return; } var o = (JObject)await DataHelper.GetDataAsync(UriProvider.GetUri(UriType.GetUserProfile, SettingsHelper.Get <string>(SettingsHelper.Uid)), true); string url = o.Value <string>("userAvatar"); var bitmapImage = await ImageCacheHelper.GetImageAsync(ImageType.BigAvatar, url); UserModel = new Models.Controls.UserHubModel(o, bitmapImage); provider?.Reset(); await provider?.Refresh(); }
public async Task <ImageSource> GetImage() => await ImageCacheHelper.GetImageAsync(Type, Url, true);
private async void Button_Click_2(object sender, RoutedEventArgs e) { pic.Source = await ImageCacheHelper.GetImageAsync(ImageType.OriginImage, picUri.Text, true); }