protected void ReloadSinaV2(Comments comments ,bool reload)
 {
     if (reload)
         UiInvoke(() => statuses.Clear());
     foreach (var s in comments.comments)
     {
         var ws = new WeiboComment();
         ws.assign_sina(s);
         UiInvoke(() => statuses.Add(ws));
     }            
 }
Esempio n. 2
0
 void assign_comments(Comments cmts)
 {
     total_number = cmts.total_number;
     next_cursor = cmts.next_cursor;
     previous_cursor = cmts.previous_cursor;
     //cmts.comments.Sort((l, r) => { return -1; });
     foreach(var c in cmts.comments)
     {
         c.preprocess();
     }
     System.Array.Sort(cmts.comments, (l, r) => r.score.CompareTo(l.score));
     foreach(var cmt in cmts.comments)
     {
         if (cmts.comments.Length >= item_per_page && cmt.score < 4)
             continue;
         var c = new WeiboComment();
         c.assign_sina(cmt);
         UiBeginInvoke(()=> comments.Add(c));
     }
 }