private async Task QueryComment(int noteid) { if (CommentIndex == 0) { if (CommentList == null) { CommentList = new ObservableCollection <CommentsResult>(); commentListView.ItemsSource = CommentList; } else { CommentList.Clear(); } } int index = 0; if (CommentList.Count != 0) { index = CommentList[CommentList.Count - 1].Id - 1; } List <CommentsResult> result = new List <CommentsResult>(); CommonProvider common = new CommonProvider(); result = await common.QueryComment(noteid.ToString(), index); result.ForEach(x => CommentList.Add(x)); CommentIndex++; }