svnno****@sourc*****
svnno****@sourc*****
2011年 6月 10日 (金) 03:22:23 JST
Revision: 1550 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1550 Author: kiri_feather Date: 2011-06-10 03:22:23 +0900 (Fri, 10 Jun 2011) Log Message: ----------- scrub_geoに対応 Modified Paths: -------------- trunk/Tween/StatusDictionary.vb trunk/Tween/Twitter.vb -------------- next part -------------- Modified: trunk/Tween/StatusDictionary.vb =================================================================== --- trunk/Tween/StatusDictionary.vb 2011-06-02 11:02:28 UTC (rev 1549) +++ trunk/Tween/StatusDictionary.vb 2011-06-09 18:22:23 UTC (rev 1550) @@ -480,7 +480,13 @@ Private _deletedIds As New List(Of Long) Private _retweets As New Dictionary(Of Long, PostClass) Private _removedTab As New Stack(Of TabClass) + Private _scrubGeo As New List(Of ScrubGeoInfo) + Private Class ScrubGeoInfo + Public UserId As Long + Public UpToStatusId As Long + End Class + Public BlockIds As New List(Of Long) '発言の追加 @@ -705,6 +711,34 @@ End SyncLock End Sub + Public Sub ScrubGeoReserve(ByVal id As Long, ByVal upToStatusId As Long) + SyncLock LockObj + Me._scrubGeo.Add(New ScrubGeoInfo With {.UserId = id, .UpToStatusId = upToStatusId}) + Me.ScrubGeo(id, upToStatusId) + End SyncLock + End Sub + + Private Sub ScrubGeo(ByVal userId As Long, ByVal upToStatusId As Long) + SyncLock LockObj + Dim userPosts = From post In Me._statuses.Values + Where post.UserId = userId AndAlso post.UserId <= upToStatusId + Select post + + For Each p In userPosts + p.PostGeo = New PostClass.StatusGeo + Next + + Dim userPosts2 = From tb In Me.GetTabsInnerStorageType + From post In tb.Posts.Values + Where post.UserId = userId AndAlso post.UserId <= upToStatusId + Select post + + For Each p In userPosts2 + p.PostGeo = New PostClass.StatusGeo + Next + End SyncLock + End Sub + Public Sub RemovePostReserve(ByVal id As Long) SyncLock LockObj Me._deletedIds.Add(id) Modified: trunk/Tween/Twitter.vb =================================================================== --- trunk/Tween/Twitter.vb 2011-06-02 11:02:28 UTC (rev 1549) +++ trunk/Tween/Twitter.vb 2011-06-09 18:22:23 UTC (rev 1550) @@ -3081,7 +3081,8 @@ isDm = True ElseIf xElm.Element("scrub_geo") IsNot Nothing Then Try - Debug.Print("scrub_geo: user_id=" + xElm.Element("scrub_geo").Element("user_id").Value.ToString + " up_to_status_id=" + xElm.Element("scrub_geo").Element("up_to_status_id").Value.ToString) + TabInformations.GetInstance.ScrubGeoReserve(Long.Parse(xElm.Element("scrub_geo").Element("user_id").Value), + Long.Parse(xElm.Element("scrub_geo").Element("up_to_status_id").Value)) Catch ex As Exception TraceOut("scrub_geo:" + line) End Try