svnno****@sourc*****
svnno****@sourc*****
2010年 11月 30日 (火) 20:25:01 JST
Revision: 1143 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1143 Author: kiri_feather Date: 2010-11-30 20:25:01 +0900 (Tue, 30 Nov 2010) Log Message: ----------- 新着反映でKeyNotFoundが出たので対策 Modified Paths: -------------- branches/UserStream/Tween/Tween.vb -------------- next part -------------- Modified: branches/UserStream/Tween/Tween.vb =================================================================== --- branches/UserStream/Tween/Tween.vb 2010-11-30 10:12:13 UTC (rev 1142) +++ branches/UserStream/Tween/Tween.vb 2010-11-30 11:25:01 UTC (rev 1143) @@ -9613,25 +9613,11 @@ End Sub Private Sub tw_NewPostFromStream() - Try - If InvokeRequired Then - Invoke(New MethodInvoker(AddressOf tw_NewPostFromStream)) - Exit Sub - End If - Catch ex As ObjectDisposedException - Exit Sub - End Try - - 'Static before As DateTime = Now - 'If before.Subtract(Now).Seconds > -5 Then Exit Sub - 'before = Now - If SettingDialog.ReadOldPosts Then _statuses.SetRead() '新着時未読クリア End If Dim rsltAddCount As Integer = _statuses.DistributePosts() - RefreshTimeline() SyncLock _syncObject Dim tm As Date = Now If _tlTimestamps.ContainsKey(tm) Then @@ -9653,7 +9639,20 @@ _tlTimestamps.Remove(key) Next keys.Clear() + + 'Static before As DateTime = Now + 'If before.Subtract(Now).Seconds > -5 Then Exit Sub + 'before = Now End SyncLock + + Try + If InvokeRequired AndAlso Not IsDisposed Then + Invoke(New MethodInvoker(AddressOf RefreshTimeline)) + Exit Sub + End If + Catch ex As ObjectDisposedException + Exit Sub + End Try End Sub Private Sub tw_UserStreamStarted() If InvokeRequired Then