From bf1696d319a851a2df1cce0dc12aeb5c0e69e9b2 Mon Sep 17 00:00:00 2001 From: Kimura Youichi Date: Thu, 13 Jun 2024 00:35:58 +0900 Subject: [PATCH] =?utf8?q?Favorites=E3=82=BF=E3=83=96=E3=81=8C=E7=A9=BA?= =?utf8?q?=E3=81=AE=E3=81=BE=E3=81=BE=E6=9B=B4=E6=96=B0=E3=81=95=E3=82=8C?= =?utf8?q?=E3=81=AA=E3=81=84=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 524e8940 ("タブの種類別に分かれていたCreatePostsFromJsonメソッドを統合") --- CHANGELOG.txt | 1 + OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs | 2 +- OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs | 2 +- OpenTween/Twitter.cs | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index edf7f454..bb36f453 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ ==== Unreleased * NEW: Misskeyでのノート投稿時のファイル添付に対応しました - 追加で必要な権限があるため、前バージョンから使用している Misskey アカウントは再度追加し直す必要があります + * FIX: Favoritesタブが空のまま更新されない不具合を修正 ==== Ver 3.14.0(2024/06/11) * NEW: メインアカウント以外のホームタイムライン表示に対応 diff --git a/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs b/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs index 14c49691..84acb0f5 100644 --- a/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs @@ -150,7 +150,7 @@ namespace OpenTween.SocialProtocol.Twitter var cursorTop = response.CursorTop; var cursorBottom = response.CursorBottom; - var posts = this.account.Legacy.CreatePostsFromJson(statuses, firstLoad); + var posts = this.account.Legacy.CreatePostsFromJson(statuses, firstLoad, favTweet: true); var filter = new TimelineResponseFilter(this.account.AccountState); posts = filter.Run(posts); diff --git a/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs b/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs index 0cd7eadd..bc3c7874 100644 --- a/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs @@ -118,7 +118,7 @@ namespace OpenTween.SocialProtocol.Twitter .ConfigureAwait(false); var (cursorTop, cursorBottom) = GetCursorFromResponse(statuses); - var posts = this.account.Legacy.CreatePostsFromJson(statuses, firstLoad); + var posts = this.account.Legacy.CreatePostsFromJson(statuses, firstLoad, favTweet: true); var filter = new TimelineResponseFilter(this.account.AccountState); posts = filter.Run(posts); diff --git a/OpenTween/Twitter.cs b/OpenTween/Twitter.cs index ebc79a7d..b014d068 100644 --- a/OpenTween/Twitter.cs +++ b/OpenTween/Twitter.cs @@ -537,8 +537,11 @@ namespace OpenTween } internal PostClass[] CreatePostsFromJson(TwitterStatus[] statuses, bool firstLoad) + => this.CreatePostsFromJson(statuses, firstLoad, favTweet: false); + + internal PostClass[] CreatePostsFromJson(TwitterStatus[] statuses, bool firstLoad, bool favTweet) { - var posts = statuses.Select(x => this.CreatePostsFromStatusData(x, firstLoad)).ToArray(); + var posts = statuses.Select(x => this.CreatePostsFromStatusData(x, firstLoad, favTweet)).ToArray(); TwitterPostFactory.AdjustSortKeyForPromotedPost(posts); -- 2.11.0