示例#1
0
        public async Task RefreshPosts()
        {
            Debug.WriteLine("RefreshPosts");
            var res = ResourceLoader.GetForCurrentView();

            if (Posts != null && !Posts.IsLoading && Posts.Count > 0 && !_wordPressService.IsLoadingPosts)
            {
                try
                {
                    Posts.Refresh();
                }
                catch (Exception ex)
                {
                    MessengerInstance.Send(new NotificationMessage(res.GetString("Notification_RefreshFailed")));
                }
            }
            else
            {
                Debug.WriteLine("Refresh denied");
            }
        }