OSDN Git Service

Listsタブでin_reply_to追いかけを行った際に、reply先発言がRecent側で保持されていないとListsタブに存在してもWebを開いていたバグを修正
authorsyo68k <syo68k@users.sourceforge.jp>
Fri, 30 Jul 2010 04:11:43 +0000 (04:11 +0000)
committerKimura Youichi <kim.upsilon@bucyou.net>
Sat, 18 Feb 2012 14:14:20 +0000 (23:14 +0900)
git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@629 e39ad16e-3079-482e-bb30-4b4d378143b6

Tween/Resources/ChangeLog.txt
Tween/Tween.vb

index 976912d..6431fd8 100644 (file)
@@ -32,6 +32,7 @@
  * 画像投稿モードでファイルを設定した際にファイルサイズチェックを行うようにした
  * 画像投稿モードで無効なファイル形式を設定した場合にファイル名がクリアされない場合があるバグを修正
  * 自プロフィール簡易表示の場合でもプロフィール画面を表示するようにした。従来通り書き込みの際に返された情報を使うのでAPIは消費しない
+ * Listsタブでin_reply_to追いかけを行った際に、reply先発言がRecent側で保持されていないとListsタブに存在してもWebを開いていたバグを修正
 ==== Ver 0.9.4.0(2010/07/15)
  * 認証完了後、自分の発言が片思い表示になるバグ修正
  * ユーザー変更時にフォロワー情報を取得するよう変更
index ff1791a..bfb256e 100644 (file)
@@ -5062,34 +5062,53 @@ RETRY:
 
     Private Sub GoInReplyToPost()
         If _curPost IsNot Nothing AndAlso _curPost.InReplyToUser IsNot Nothing AndAlso _curPost.InReplyToId > 0 Then
-            If _statuses.ContainsKey(_curPost.InReplyToId) Then
-                Dim tab As TabPage = _curTab
-                Dim idx As Integer = _statuses.Tabs(_curTab.Text).IndexOf(_curPost.InReplyToId)
-                If idx = -1 Then
-                    For Each tab In ListTab.TabPages
-                        idx = _statuses.Tabs(tab.Text).IndexOf(_curPost.InReplyToId)
-                        If idx <> -1 Then
-                            Exit For
+            If _statuses.Tabs(_curTab.Text).TabType = TabUsageType.Lists Then
+                If _statuses.Tabs(_curTab.Text).Posts.ContainsKey(_curPost.InReplyToId) Then
+                    Dim idx As Integer = _statuses.Tabs(_curTab.Text).IndexOf(_curPost.InReplyToId)
+                    If idx = -1 Then
+                        Dim repPost As PostClass = _statuses.Item(_curPost.InReplyToId)
+                        MessageBox.Show(repPost.Name + " / " + repPost.Nickname + "   (" + repPost.PDate.ToString() + ")" + Environment.NewLine + repPost.Data)
+                    Else
+                        If replyChains Is Nothing OrElse (replyChains.Count > 0 AndAlso replyChains.Peek().InReplyToId <> _curPost.Id) Then
+                            replyChains = New Stack(Of ReplyChain)
                         End If
-                    Next
-                End If
-                If idx = -1 Then
-                    Dim repPost As PostClass = _statuses.Item(_curPost.InReplyToId)
-                    MessageBox.Show(repPost.Name + " / " + repPost.Nickname + "   (" + repPost.PDate.ToString() + ")" + Environment.NewLine + repPost.Data)
+                        replyChains.Push(New ReplyChain(_curPost.Id, _curPost.InReplyToId, _curTab))
+                        SelectListItem(_curList, idx)
+                        _curList.EnsureVisible(idx)
+                    End If
                 Else
-                    If replyChains Is Nothing OrElse (replyChains.Count > 0 AndAlso replyChains.Peek().InReplyToId <> _curPost.Id) Then
-                        replyChains = New Stack(Of ReplyChain)
+                    OpenUriAsync("http://twitter.com/" + _curPost.InReplyToUser + "/statuses/" + _curPost.InReplyToId.ToString())
+                End If
+            Else
+                If _statuses.ContainsKey(_curPost.InReplyToId) Then
+                    Dim tab As TabPage = _curTab
+                    Dim idx As Integer = _statuses.Tabs(_curTab.Text).IndexOf(_curPost.InReplyToId)
+                    If idx = -1 Then
+                        For Each tab In ListTab.TabPages
+                            idx = _statuses.Tabs(tab.Text).IndexOf(_curPost.InReplyToId)
+                            If idx <> -1 Then
+                                Exit For
+                            End If
+                        Next
                     End If
-                    replyChains.Push(New ReplyChain(_curPost.Id, _curPost.InReplyToId, _curTab))
+                    If idx = -1 Then
+                        Dim repPost As PostClass = _statuses.Item(_curPost.InReplyToId)
+                        MessageBox.Show(repPost.Name + " / " + repPost.Nickname + "   (" + repPost.PDate.ToString() + ")" + Environment.NewLine + repPost.Data)
+                    Else
+                        If replyChains Is Nothing OrElse (replyChains.Count > 0 AndAlso replyChains.Peek().InReplyToId <> _curPost.Id) Then
+                            replyChains = New Stack(Of ReplyChain)
+                        End If
+                        replyChains.Push(New ReplyChain(_curPost.Id, _curPost.InReplyToId, _curTab))
 
-                    If tab IsNot _curTab Then
-                        ListTab.SelectTab(tab)
+                        If tab IsNot _curTab Then
+                            ListTab.SelectTab(tab)
+                        End If
+                        SelectListItem(_curList, idx)
+                        _curList.EnsureVisible(idx)
                     End If
-                    SelectListItem(_curList, idx)
-                    _curList.EnsureVisible(idx)
+                Else
+                    OpenUriAsync("http://twitter.com/" + _curPost.InReplyToUser + "/statuses/" + _curPost.InReplyToId.ToString())
                 End If
-            Else
-                OpenUriAsync("http://twitter.com/" + _curPost.InReplyToUser + "/statuses/" + _curPost.InReplyToId.ToString())
             End If
         End If
     End Sub