summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/ThreadViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewModels/ThreadViewModel.cs')
-rw-r--r--Juick/ViewModels/ThreadViewModel.cs20
1 files changed, 6 insertions, 14 deletions
diff --git a/Juick/ViewModels/ThreadViewModel.cs b/Juick/ViewModels/ThreadViewModel.cs
index 80d8b3e..a929700 100644
--- a/Juick/ViewModels/ThreadViewModel.cs
+++ b/Juick/ViewModels/ThreadViewModel.cs
@@ -48,20 +48,12 @@ namespace Juick.ViewModels
{
var item = new MessageViewModel(post);
Items.Add(item);
- var imageRequest =
- new RestRequest(
- string.Format("/as/{0}.png",
- post.User.Uid));
- App.AvatarClient.ExecuteAsync(
- imageRequest, restResponse =>
- {
- item.UserAvatar = new BitmapImage
- ();
- item.UserAvatar.SetSource(new MemoryStream(restResponse.RawBytes));
- item.
- NotifyPropertyChanged
- ("UserAvatar");
- });
+ var imageUri = new Uri(string.Format("http://i.juick.com/as/{0}.png", post.User.Uid), UriKind.Absolute);
+ item.UserAvatar = new BitmapImage
+ {
+ UriSource = imageUri
+ };
+ item.NotifyPropertyChanged("UserAvatar");
});
IsDataLoaded = true;
NotifyPropertyChanged("Items");