svnno****@sourc*****
svnno****@sourc*****
2011年 1月 19日 (水) 20:30:50 JST
Revision: 1377 http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1377 Author: syo68k Date: 2011-01-19 20:30:49 +0900 (Wed, 19 Jan 2011) Log Message: ----------- Fav,Fav解除で詳細表示の再描画がかからなかったのを修正 Modified Paths: -------------- trunk/Tween/StatusDictionary.vb trunk/Tween/Tween.vb -------------- next part -------------- Modified: trunk/Tween/StatusDictionary.vb =================================================================== --- trunk/Tween/StatusDictionary.vb 2011-01-19 07:30:40 UTC (rev 1376) +++ trunk/Tween/StatusDictionary.vb 2011-01-19 11:30:49 UTC (rev 1377) @@ -405,6 +405,43 @@ Return post End Function + Public Overrides Function Equals(ByVal obj As Object) As Boolean + If (obj Is Nothing) OrElse Not (Me.GetType() Is obj.GetType()) Then Return False + Return Me.Equals(CType(obj, PostClass)) + End Function + + Public Overloads Function Equals(ByVal other As PostClass) As Boolean + Return (Me.Nickname = other.Nickname) AndAlso + (Me.Data = other.Data) AndAlso + (Me.ImageUrl = other.ImageUrl) AndAlso + (Me.Name = other.Name) AndAlso + (Me.PDate = other.PDate) AndAlso + (Me.Id = other.Id) AndAlso + (Me.IsFav = other.IsFav) AndAlso + (Me.OriginalData = other.OriginalData) AndAlso + (Me.IsRead = other.IsRead) AndAlso + (Me.IsReply = other.IsReply) AndAlso + (Me.IsExcludeReply = other.IsExcludeReply) AndAlso + (Me.IsProtect = other.IsProtect) AndAlso + (Me.IsOwl = other.IsOwl) AndAlso + (Me.IsMark = other.IsMark) AndAlso + (Me.InReplyToUser = other.InReplyToUser) AndAlso + (Me.InReplyToStatusId = other.InReplyToStatusId) AndAlso + (Me.Source = other.Source) AndAlso + (Me.SourceHtml = other.SourceHtml) AndAlso + (Me.ReplyToList.Equals(other.ReplyToList)) AndAlso + (Me.IsMe = other.IsMe) AndAlso + (Me.IsDm = other.IsDm) AndAlso + (Me.UserId = other.UserId) AndAlso + (Me.FilterHit = other.FilterHit) AndAlso + (Me.RetweetedBy = other.RetweetedBy) AndAlso + (Me.RetweetedId = other.RetweetedId) AndAlso + (Me.RelTabName = other.RelTabName) AndAlso + (Me.IsDeleted = other.IsDeleted) AndAlso + (Me.InReplyToUserId = other.InReplyToUserId) AndAlso + (Me.Language = other.Language) + + End Function #Region "IClonable.Clone" Private Function Clone() As Object Implements ICloneable.Clone Return Me.MemberwiseClone() Modified: trunk/Tween/Tween.vb =================================================================== --- trunk/Tween/Tween.vb 2011-01-19 07:30:40 UTC (rev 1376) +++ trunk/Tween/Tween.vb 2011-01-19 11:30:49 UTC (rev 1377) @@ -2296,7 +2296,7 @@ End If ChangeCacheStyleRead(post.IsRead, idx, _curTab) End If - If idx = _curItemIndex Then DispSelectedPost() '選択アイテム再表示 + If idx = _curItemIndex Then DispSelectedPost(True) '選択アイテム再表示 End If End If Next @@ -4616,18 +4616,24 @@ Return detailHtmlFormatHeader + orgdata + detailHtmlFormatFooter End Function - Private Sub DispSelectedPost() + Private Overloads Sub DispSelectedPost() + DispSelectedPost(False) + End Sub + + Private Overloads Sub DispSelectedPost(ByVal forceupdate As Boolean) Static displaypost As New PostClass If _curList.SelectedIndices.Count = 0 OrElse _ - _curPost Is Nothing OrElse _ - _curPost.Equals(displaypost) Then Exit Sub + _curPost Is Nothing Then Exit Sub + If Not forceupdate AndAlso _curPost.Equals(displaypost) Then + Exit Sub + End If + displaypost = _curPost Dim dTxt As String = createDetailHtml(If(_curPost.IsDeleted, "(DELETED)", _curPost.OriginalData)) If _curPost.IsDm Then SourceLinkLabel.Tag = Nothing SourceLinkLabel.Text = "" - 'SourceLinkLabel.Visible = False Else Dim mc As Match = Regex.Match(_curPost.SourceHtml, "<a href=""(?<sourceurl>.+?)""") If mc.Success Then @@ -8277,7 +8283,7 @@ Private Sub doGetFollowersMenu() GetTimeline(WORKERTYPE.Follower, 1, 0, "") - DispSelectedPost() + DispSelectedPost(True) End Sub Private Sub GetFollowersAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateFollowersMenuItem1.Click @@ -8419,7 +8425,7 @@ Private Sub DumpPostClassToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DumpPostClassToolStripMenuItem.Click If _curPost IsNot Nothing Then - DispSelectedPost() + DispSelectedPost(True) End If End Sub