void SetMinMaxIds(Statuses sts) { foreach (var s in sts.statuses) { if (MaxId < s.id) MaxId = s.id; if (MinId > s.id) MinId = s.id; } var mem = MemoryCache.Default; mem.Set("hometimeline_since_id",MaxId, DateTimeOffset.Now.AddMinutes(30)); }
internal void ReloadSinaV2(Statuses result,bool reload ) { previous_cursor = result.previous_cursor; next_cursor = result.next_cursor; total_number = result.total_number; Debug.WriteLine("noti: {3}, timeline total: {0},prev: {1},next: {2}",total_number,previous_cursor, next_cursor, notifications); if(reload) UiInvoke(() => statuses.Clear()); foreach (var s in result.statuses) { var ws = new WeiboStatus(); ws.assign_sina(s); UiInvoke(() => statuses.Add(ws)); } }