From a07dbdae341300375c8281452a0dd91284bbe7cf Mon Sep 17 00:00:00 2001 From: anis774 Date: Sun, 26 Dec 2010 12:29:11 +0000 Subject: [PATCH] =?utf8?q?=E6=A4=9C=E7=B4=A2=E3=82=BF=E3=83=96=E3=81=A7?= =?utf8?q?=E3=81=AE[=E3=81=A7=E3=81=AEInReplyTo=E5=8F=96=E5=BE=97=E3=82=92?= =?utf8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@1258 e39ad16e-3079-482e-bb30-4b4d378143b6 --- Tween/Tween.vb | 17 ++++++++++++++++- Tween/Twitter.vb | 32 ++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Tween/Tween.vb b/Tween/Tween.vb index 3044968d..d97f5e8c 100644 --- a/Tween/Tween.vb +++ b/Tween/Tween.vb @@ -5447,13 +5447,28 @@ RETRY: End Sub Private Sub GoInReplyToPost() + Dim curTabClass As TabClass = _statuses.Tabs(_curTab.Text) + + If curTabClass.TabType = TabUsageType.PublicSearch AndAlso _curPost.InReplyToId = 0 Then + Dim post As PostClass = Nothing + Dim r As String = tw.GetStatusApi(False, _curPost.Id, post) + If r = "" AndAlso post IsNot Nothing Then + _curPost.InReplyToId = post.InReplyToId + _curPost.InReplyToUser = post.InReplyToUser + _curPost.IsReply = post.IsReply + Else + Me.StatusLabelUrl.Text = r + End If + End If + If Not (Me.ExistCurrentPost AndAlso _curPost.InReplyToUser IsNot Nothing AndAlso _curPost.InReplyToId > 0) Then Return Dim inReplyToIndex As Integer Dim inReplyToTabName As String - Dim curTabClass As TabClass = _statuses.Tabs(_curTab.Text) Dim curTabPosts As Dictionary(Of Long, PostClass) + + If _statuses.Tabs(_curTab.Text).IsInnerStorageTabType Then curTabPosts = curTabClass.Posts Else diff --git a/Tween/Twitter.vb b/Tween/Twitter.vb index 0fc6913d..2deb3818 100644 --- a/Tween/Twitter.vb +++ b/Tween/Twitter.vb @@ -1384,8 +1384,7 @@ Public Class Twitter Public Function GetStatusApi(ByVal read As Boolean, ByVal id As Int64, - ByVal tab As TabClass) As String - + ByRef post As PostClass) As String If Twitter.AccountState <> ACCOUNT_STATE.Valid Then Return "" If _endingFlag Then Return "" @@ -1425,13 +1424,26 @@ Public Class Twitter If item Is Nothing Then Return "Err:Can't create post" item.IsRead = read If item.IsMe AndAlso Not read AndAlso _readOwnPost Then item.IsRead = True - If tab IsNot Nothing Then item.RelTabName = tab.TabName - '非同期アイコン取得&StatusDictionaryに追加 - TabInformations.GetInstance.AddPost(item) + post = item Return "" End Function + Public Function GetStatusApi(ByVal read As Boolean, + ByVal id As Int64, + ByVal tab As TabClass) As String + Dim post As PostClass = Nothing + Dim r As String = Me.GetStatusApi(read, id, post) + + If r = "" Then + If tab IsNot Nothing Then post.RelTabName = tab.TabName + '非同期アイコン取得&StatusDictionaryに追加 + TabInformations.GetInstance.AddPost(post) + End If + + Return r + End Function + Private Function CreatePostsFromStatusData(ByVal status As TwitterDataModel.Status) As PostClass Dim post As New PostClass @@ -1974,11 +1986,11 @@ Public Class Twitter End If End If - post.Uid = user.id + post.Uid = user.Id post.Name = user.ScreenName post.Nickname = user.Name post.ImageUrl = user.ProfileImageUrl - post.IsProtect = user.protected + post.IsProtect = user.Protected Catch ex As Exception TraceOut(content) MessageBox.Show("Parse Error(CreateDirectMessagesFromJson)") @@ -2102,13 +2114,13 @@ Public Class Twitter 'Id post.RetweetedId = post.Id '本文 - post.Data = retweeted.text + post.Data = retweeted.Text 'Source取得(htmlの場合は、中身を取り出し) - post.Source = retweeted.source + post.Source = retweeted.Source 'Reply先 Long.TryParse(retweeted.InReplyToStatusId, post.InReplyToId) post.InReplyToUser = retweeted.InReplyToScreenName - post.IsFav = retweeted.favorited + post.IsFav = retweeted.Favorited '以下、ユーザー情報 Dim user As TwitterDataModel.User = retweeted.User -- 2.11.0