void SetMinMaxIds(Comments comments)
 {
     foreach(var cmt in comments.comments)
     {
         if (MaxId < cmt.id)
             MaxId = cmt.id;
         if (MinId > cmt.id)
             MinId = cmt.id;
     }
 }
Exemplo n.º 2
0
 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));
     }            
 }
Exemplo n.º 3
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));
     }
 }