private void OnPostsLoadedAfterUpdate(PostListModel responseObject) { this.AddPosts(responseObject); this.IsLoadingAfterUpdate = false; this._updateTask = null; }
private void AddPosts(PostListModel postList) { int index = this.Posts.Count + 1; var lastPostNumber = this.Posts.Select(p => p.Number).DefaultIfEmpty(0).Max(); var newPosts = postList.Posts.Select(postArray => postArray[0]).SkipWhile(post => post.Number <= lastPostNumber); foreach (var post in newPosts) { this.AddModel(post, index); index++; } }
private void OnPostsLoaded(PostListModel responseObject) { this.AddPosts(responseObject); this.HideLoading(); this._currentTask = null; }