public async Task RefreshCommentsCollection(string id) { foreach (var model in await CommonDataLoader.GetGeneralModelsCollectionByUriAsync <CommentModel>(string.Format(ServicesUrl.MovieComment, Id))) { if (model.Type == "0") { HotComments.Add(model); } else { NormalComments.Add(model); } } }
public async Task RefreshCommentsCollection(string uri) { foreach (var item in await DataHelper.GetCommentJsonArrayAsync(uri)) { var tem = JsonConvert.DeserializeObject <CommentModel>(item.Stringify()); if (tem.Type == "0") { HotComments.Add(tem); } else { NormalComments.Add(tem); } } }
public void AddToCommentsCollection(CommentModel model) { HotComments.Add(model); }