diff options
author | Vitaly Takmazov | 2013-04-26 22:04:18 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-04-26 22:04:18 +0400 |
commit | ee46fb9228fd6e70893270703d814a400bb8ca22 (patch) | |
tree | 32bbe9e4b43c1fb6906ac708009020cc1990bbf0 /Juick/ViewModels/PageViewModel.cs | |
parent | e7fb2a3794bc7fb3c6592312d2628d9d11eedf3b (diff) |
Fixed crash when network is unavailable, added warning message
Diffstat (limited to 'Juick/ViewModels/PageViewModel.cs')
-rw-r--r-- | Juick/ViewModels/PageViewModel.cs | 2 |
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; |