From: syo68k Date: Fri, 30 Jul 2010 04:11:43 +0000 (+0000) Subject: Listsタブでin_reply_to追いかけを行った際に、reply先発言がRecent側で保持されていないとListsタブに存在してもWebを開いていたバグを修正 X-Git-Tag: Tween_v0.9.5.0~40 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=708c98612c2801cee66e11fe737e3d0b35dcbcfb;p=opentween%2Fopen-tween.git Listsタブでin_reply_to追いかけを行った際に、reply先発言がRecent側で保持されていないとListsタブに存在してもWebを開いていたバグを修正 git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@629 e39ad16e-3079-482e-bb30-4b4d378143b6 --- diff --git a/Tween/Resources/ChangeLog.txt b/Tween/Resources/ChangeLog.txt index 976912d1..6431fd81 100644 --- a/Tween/Resources/ChangeLog.txt +++ b/Tween/Resources/ChangeLog.txt @@ -32,6 +32,7 @@ * 画像投稿モードでファイルを設定した際にファイルサイズチェックを行うようにした * 画像投稿モードで無効なファイル形式を設定した場合にファイル名がクリアされない場合があるバグを修正 * 自プロフィール簡易表示の場合でもプロフィール画面を表示するようにした。従来通り書き込みの際に返された情報を使うのでAPIは消費しない + * Listsタブでin_reply_to追いかけを行った際に、reply先発言がRecent側で保持されていないとListsタブに存在してもWebを開いていたバグを修正 ==== Ver 0.9.4.0(2010/07/15) * 認証完了後、自分の発言が片思い表示になるバグ修正 * ユーザー変更時にフォロワー情報を取得するよう変更 diff --git a/Tween/Tween.vb b/Tween/Tween.vb index ff1791a3..bfb256e9 100644 --- a/Tween/Tween.vb +++ b/Tween/Tween.vb @@ -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