summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/PageViewModel.cs
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-04-26 22:04:18 +0400
committerGravatar Vitaly Takmazov2013-04-26 22:04:18 +0400
commitee46fb9228fd6e70893270703d814a400bb8ca22 (patch)
tree32bbe9e4b43c1fb6906ac708009020cc1990bbf0 /Juick/ViewModels/PageViewModel.cs
parente7fb2a3794bc7fb3c6592312d2628d9d11eedf3b (diff)
Fixed crash when network is unavailable, added warning message
Diffstat (limited to 'Juick/ViewModels/PageViewModel.cs')
-rw-r--r--Juick/ViewModels/PageViewModel.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Juick/ViewModels/PageViewModel.cs b/Juick/ViewModels/PageViewModel.cs
index e398caf..ce48449 100644
--- a/Juick/ViewModels/PageViewModel.cs
+++ b/Juick/ViewModels/PageViewModel.cs
@@ -72,6 +72,8 @@ namespace Juick.ViewModels
_context.Client.ExecuteAsync<List<Message>>(request, response =>
{
_context.IsDataLoading = false;
+ if (response.Data == null)
+ return;
response.Data.Select(x => new PostItem(x)).ToList().ForEach(i => Items.Add(i));
});
_context.IsDataLoading = true;