private void RefreshCommentsForSinaWeibo()
{
if (string.IsNullOrEmpty(m_itemViewModel.ID))
return;
SinaWeiboFetcher fetcher = new SinaWeiboFetcher();
fetcher.LoadSinaWeiboCommentByStatusID(m_itemViewModel.ID, (comments) =>
{
if (comments == null)
{
return;
}
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
Comments.Clear();
foreach (Comment comment in comments.comments)
{
CommentViewModel model = SinaWeiboModelConverter.ConvertCommentToCommon(comment);
if (model != null)
{
Comments.Add(model);
}
}
UpdateCommentCount(comments.comments.Length);
AddEmptyTipCommentCleverly();
});
});
}