diff --git a/OpenTween.Tests/Models/TabInformationTest.cs b/OpenTween.Tests/Models/TabInformationTest.cs index 01f5c202c..650491075 100644 --- a/OpenTween.Tests/Models/TabInformationTest.cs +++ b/OpenTween.Tests/Models/TabInformationTest.cs @@ -1199,6 +1199,7 @@ public void ClearTabIds_NotAffectToOtherTabs_Test() [Fact] public void RefreshOwl_HomeTabTest() { + var accountId = Guid.NewGuid(); var post = new PostClass { StatusId = new TwitterStatusId("100"), @@ -1211,7 +1212,7 @@ public void RefreshOwl_HomeTabTest() this.tabinfo.SubmitUpdate(); var followerIds = new HashSet { new TwitterUserId("123") }; - this.tabinfo.RefreshOwl(followerIds); + this.tabinfo.RefreshOwl(accountId, followerIds, isPrimary: true); Assert.False(post.IsOwl); } @@ -1219,6 +1220,7 @@ public void RefreshOwl_HomeTabTest() [Fact] public void RefreshOwl_InnerStoregeTabTest() { + var accountId = Guid.NewGuid(); var tab = new PublicSearchTabModel("search"); this.tabinfo.AddTab(tab); @@ -1234,7 +1236,7 @@ public void RefreshOwl_InnerStoregeTabTest() this.tabinfo.SubmitUpdate(); var followerIds = new HashSet { new TwitterUserId("123") }; - this.tabinfo.RefreshOwl(followerIds); + this.tabinfo.RefreshOwl(accountId, followerIds, isPrimary: true); Assert.False(post.IsOwl); } @@ -1242,6 +1244,7 @@ public void RefreshOwl_InnerStoregeTabTest() [Fact] public void RefreshOwl_UnfollowedTest() { + var accountId = Guid.NewGuid(); var post = new PostClass { StatusId = new TwitterStatusId("100"), @@ -1254,7 +1257,56 @@ public void RefreshOwl_UnfollowedTest() this.tabinfo.SubmitUpdate(); var followerIds = new HashSet { new TwitterUserId("456") }; - this.tabinfo.RefreshOwl(followerIds); + this.tabinfo.RefreshOwl(accountId, followerIds, isPrimary: true); + + Assert.True(post.IsOwl); + } + + [Fact] + public void RefreshOwl_SecondaryAccountTabTest() + { + var accountId = Guid.NewGuid(); + var tab = new HomeSpecifiedAccountTabModel("secondary", accountId); + this.tabinfo.AddTab(tab); + + var post = new PostClass + { + StatusId = new TwitterStatusId("100"), + ScreenName = "aaa", + UserId = new TwitterUserId("234"), + IsOwl = true, + }; + tab.AddPostQueue(post); + this.tabinfo.DistributePosts(); + this.tabinfo.SubmitUpdate(); + + var followerIds = new HashSet { new TwitterUserId("123") }; + this.tabinfo.RefreshOwl(accountId, followerIds, isPrimary: false); + + Assert.True(post.IsOwl); + } + + [Fact] + public void RefreshOwl_SecondaryAccountTab_AccountNotMatchedTest() + { + var accountId = Guid.NewGuid(); + var tab = new HomeSpecifiedAccountTabModel("secondary", accountId); + this.tabinfo.AddTab(tab); + + var post = new PostClass + { + StatusId = new TwitterStatusId("100"), + ScreenName = "aaa", + UserId = new TwitterUserId("234"), + IsOwl = true, + }; + tab.AddPostQueue(post); + this.tabinfo.DistributePosts(); + this.tabinfo.SubmitUpdate(); + + var otherAccountId = Guid.NewGuid(); // 他アカウントの followerIds なので IsOwl は更新されない + var followerIds = new HashSet { new TwitterUserId("123") }; + this.tabinfo.RefreshOwl(otherAccountId, followerIds, isPrimary: false); Assert.True(post.IsOwl); } diff --git a/OpenTween/Models/TabInformations.cs b/OpenTween/Models/TabInformations.cs index af92203c2..d2073c9c0 100644 --- a/OpenTween/Models/TabInformations.cs +++ b/OpenTween/Models/TabInformations.cs @@ -866,34 +866,29 @@ public void ClearTabIds(string tabName) } } - public void RefreshOwl(ISet follower) + public void RefreshOwl(Guid accountId, ISet follower, bool isPrimary) { lock (this.lockObj) { - var allPosts = this.GetTabsByType() - .SelectMany(x => x.Posts.Values) - .Concat(this.Posts.Values); + static bool DetermineOwl(PostClass post, ISet followers) + => !post.IsMe && followers.Count > 0 && !followers.Contains(post.UserId); - if (follower.Count > 0) + static bool SourceAccountIdMatched(TabModel tab, Guid accountId, bool isPrimary) + => tab.SourceAccountId == accountId || (isPrimary && tab.SourceAccountId == null); + + if (isPrimary) { - foreach (var post in allPosts) - { - if (post.IsMe) - { - post.IsOwl = false; - } - else - { - post.IsOwl = !follower.Contains(post.UserId); - } - } + foreach (var post in this.Posts.Values) + post.IsOwl = DetermineOwl(post, follower); } - else + + foreach (var tab in this.GetTabsByType()) { - foreach (var post in allPosts) - { - post.IsOwl = false; - } + if (!SourceAccountIdMatched(tab, accountId, isPrimary)) + continue; + + foreach (var post in tab.Posts.Values) + post.IsOwl = DetermineOwl(post, follower); } } } diff --git a/OpenTween/Properties/Resources.Designer.cs b/OpenTween/Properties/Resources.Designer.cs index 668f76c64..37600be5e 100644 --- a/OpenTween/Properties/Resources.Designer.cs +++ b/OpenTween/Properties/Resources.Designer.cs @@ -2105,6 +2105,33 @@ internal static System.Drawing.Icon Refresh4 { } } + /// + /// Configuration取得エラー : に類似しているローカライズされた文字列を検索します。 + /// + internal static string RefreshConfiguration_Error { + get { + return ResourceManager.GetString("RefreshConfiguration_Error", resourceCulture); + } + } + + /// + /// Configuration取得中... に類似しているローカライズされた文字列を検索します。 + /// + internal static string RefreshConfiguration_Start { + get { + return ResourceManager.GetString("RefreshConfiguration_Start", resourceCulture); + } + } + + /// + /// Configuration取得完了 に類似しているローカライズされた文字列を検索します。 + /// + internal static string RefreshConfiguration_Success { + get { + return ResourceManager.GetString("RefreshConfiguration_Success", resourceCulture); + } + } + /// /// Recent更新中... に類似しているローカライズされた文字列を検索します。 /// @@ -3181,87 +3208,6 @@ internal static string UnhandledExceptionText9 { } } - /// - /// BlockIds取得中... に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateBlockUserText1 { - get { - return ResourceManager.GetString("UpdateBlockUserText1", resourceCulture); - } - } - - /// - /// BlockIds取得エラー : に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateBlockUserText2 { - get { - return ResourceManager.GetString("UpdateBlockUserText2", resourceCulture); - } - } - - /// - /// BlockIds取得完了 に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateBlockUserText3 { - get { - return ResourceManager.GetString("UpdateBlockUserText3", resourceCulture); - } - } - - /// - /// Followers取得中... に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateFollowersMenuItem1_ClickText1 { - get { - return ResourceManager.GetString("UpdateFollowersMenuItem1_ClickText1", resourceCulture); - } - } - - /// - /// Followers取得エラー: に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateFollowersMenuItem1_ClickText2 { - get { - return ResourceManager.GetString("UpdateFollowersMenuItem1_ClickText2", resourceCulture); - } - } - - /// - /// Followers取得完了 に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateFollowersMenuItem1_ClickText3 { - get { - return ResourceManager.GetString("UpdateFollowersMenuItem1_ClickText3", resourceCulture); - } - } - - /// - /// MuteUserIds取得エラー: {0} に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateMuteUserIds_Error { - get { - return ResourceManager.GetString("UpdateMuteUserIds_Error", resourceCulture); - } - } - - /// - /// MuteUserIds取得完了 に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateMuteUserIds_Finish { - get { - return ResourceManager.GetString("UpdateMuteUserIds_Finish", resourceCulture); - } - } - - /// - /// MuteUserIds取得中... に類似しているローカライズされた文字列を検索します。 - /// - internal static string UpdateMuteUserIds_Start { - get { - return ResourceManager.GetString("UpdateMuteUserIds_Start", resourceCulture); - } - } - /// /// Bitlyを使用するには設定画面で認証情報を入力する必要があります に類似しているローカライズされた文字列を検索します。 /// diff --git a/OpenTween/Properties/Resources.en.resx b/OpenTween/Properties/Resources.en.resx index 383e243ea..8c8efe559 100644 --- a/OpenTween/Properties/Resources.en.resx +++ b/OpenTween/Properties/Resources.en.resx @@ -206,6 +206,9 @@ Available service: {1} Recent refreshing... [Quote @{0}: {1}] Please do Authentication processing to get/send Direct Messages again. + Failed to get configuration: + Getting configuration... + Done to get configuration Recent refreshing... Reply refreshing... DMRcv refreshing... @@ -331,15 +334,6 @@ Do you retry to update status? {0}.exe Version: {1} Exception {0}: {1} We are sorry but error was happened. A log text was created as {0} in same folder of %AppName%. Please send this to {1} or{3}tweet to {2} in Twitter.{3}[OK] to open log file. [Cancel] to continue. - Getting BlockIds... - Failed to get BlockIds: - Done to get BlockIds - Followers refreshing... - Followers refresh error: - Followers refreshed - Failed to get MuteUserIds: {0} - Done to get MuteUserIds - Getting MuteUserIds... To use Bitly, you must perform the Bitly authentication in settings dialog. Accept Updating Profile... diff --git a/OpenTween/Properties/Resources.resx b/OpenTween/Properties/Resources.resx index 5fbf6339d..cad89ca0c 100644 --- a/OpenTween/Properties/Resources.resx +++ b/OpenTween/Properties/Resources.resx @@ -236,6 +236,9 @@ ..\Resources\re2.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\re3.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\re4.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Configuration取得エラー : + Configuration取得中... + Configuration取得完了 Recent更新中... Reply更新中... DMRcv更新中... @@ -365,15 +368,6 @@ {0}.exeのバージョン: {1} 例外 {0}: {1} エラーが発生しました。ごめんなさい。ログをexeファイルのある場所に {0} として作ったので、{1}まで送っていただけると助かります。{3}ご面倒なら{2}までお知らせ頂くだけでも助かります。{3}「はい」ボタンをクリックするとログを開きます。ログを開かない場合は「いいえ」、このまま終了する場合は「キャンセル」ボタンをクリックしてください。 - BlockIds取得中... - BlockIds取得エラー : - BlockIds取得完了 - Followers取得中... - Followers取得エラー: - Followers取得完了 - MuteUserIds取得エラー: {0} - MuteUserIds取得完了 - MuteUserIds取得中... Bitlyを使用するには設定画面で認証情報を入力する必要があります 適用 プロフィール更新中・・・ diff --git a/OpenTween/SocialProtocol/ISocialProtocolClient.cs b/OpenTween/SocialProtocol/ISocialProtocolClient.cs index 45743a0d3..3319b95fe 100644 --- a/OpenTween/SocialProtocol/ISocialProtocolClient.cs +++ b/OpenTween/SocialProtocol/ISocialProtocolClient.cs @@ -53,5 +53,7 @@ public interface ISocialProtocolClient public Task RetweetPost(PostId postId); public Task UnretweetPost(PostId postId); + + public Task RefreshConfiguration(); } } diff --git a/OpenTween/SocialProtocol/InvalidAccount.cs b/OpenTween/SocialProtocol/InvalidAccount.cs index d43965b6a..20c1f7046 100644 --- a/OpenTween/SocialProtocol/InvalidAccount.cs +++ b/OpenTween/SocialProtocol/InvalidAccount.cs @@ -108,6 +108,9 @@ public Task UnfavoritePost(PostId postId) public Task UnretweetPost(PostId postId) => throw this.CreateException(); + public Task RefreshConfiguration() + => throw this.CreateException(); + private WebApiException CreateException() => new("Invalid account"); } diff --git a/OpenTween/SocialProtocol/Twitter/TwitterAccountState.cs b/OpenTween/SocialProtocol/Twitter/TwitterAccountState.cs index 5640a6323..2ce9f0f7c 100644 --- a/OpenTween/SocialProtocol/Twitter/TwitterAccountState.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterAccountState.cs @@ -47,6 +47,10 @@ public class TwitterAccountState public ISet NoRetweetUserIds { get; set; } = new HashSet(); + public TwitterConfiguration Configuration { get; } = TwitterConfiguration.DefaultConfiguration(); + + public TwitterTextConfiguration TextConfiguration { get; } = TwitterTextConfiguration.DefaultConfiguration(); + public bool HasUnrecoverableError { get; set; } = true; public TwitterAccountState() diff --git a/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs b/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs index 2cea509e8..54acfbd1b 100644 --- a/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterGraphqlClient.cs @@ -282,6 +282,17 @@ await request.Send(this.account.Connection) .ConfigureAwait(false); } + public async Task RefreshConfiguration() + { + await Task.WhenAll(new[] + { + this.account.Legacy.RefreshFollowerIds(), + this.account.Legacy.RefreshBlockIds(), + this.account.Legacy.RefreshMuteUserIdsAsync(), + this.account.Legacy.RefreshNoRetweetIds(), + }); + } + private TwitterStatusId AssertTwitterStatusId(PostId postId) { return postId is TwitterStatusId statusId diff --git a/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs b/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs index 4e6e5c020..39b02170a 100644 --- a/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs +++ b/OpenTween/SocialProtocol/Twitter/TwitterV1Client.cs @@ -233,6 +233,17 @@ await this.account.Legacy.Api.StatusesUnretweet(statusId) .ConfigureAwait(false); } + public async Task RefreshConfiguration() + { + await Task.WhenAll(new[] + { + this.account.Legacy.RefreshFollowerIds(), + this.account.Legacy.RefreshBlockIds(), + this.account.Legacy.RefreshMuteUserIdsAsync(), + this.account.Legacy.RefreshNoRetweetIds(), + }); + } + private TwitterStatusId AssertTwitterStatusId(PostId postId) { return postId is TwitterStatusId statusId diff --git a/OpenTween/Tween.cs b/OpenTween/Tween.cs index 6cb5890a6..2dc1a170c 100644 --- a/OpenTween/Tween.cs +++ b/OpenTween/Tween.cs @@ -519,14 +519,7 @@ ThumbnailGenerator thumbGenerator this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.PublicSearch] = () => this.InvokeAsync(() => this.RefreshTabAsync()); this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.User] = () => this.InvokeAsync(() => this.RefreshTabAsync()); this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.List] = () => this.InvokeAsync(() => this.RefreshTabAsync()); - this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.Config] = () => this.InvokeAsync(() => Task.WhenAll(new[] - { - this.DoGetFollowersMenu(), - this.RefreshBlockIdsAsync(), - this.RefreshMuteUserIdsAsync(), - this.RefreshNoRetweetIdsAsync(), - this.RefreshTwitterConfigurationAsync(), - })); + this.timelineScheduler.UpdateFunc[TimelineSchedulerTaskType.Config] = () => this.InvokeAsync(() => this.RefreshConfigurationAsync()); this.RefreshTimelineScheduler(); this.selectionDebouncer = DebounceTimer.Create(() => this.InvokeAsync(() => this.UpdateSelectedPost()), TimeSpan.FromMilliseconds(100), leading: true); @@ -1793,100 +1786,46 @@ await Task.Run(async () => } } - private async Task RefreshFollowerIdsAsync() - { - await this.workerSemaphore.WaitAsync(); - - try - { - this.RefreshTasktrayIcon(); - this.StatusLabel.Text = Properties.Resources.UpdateFollowersMenuItem1_ClickText1; - - await this.tw.RefreshFollowerIds(); - - this.StatusLabel.Text = Properties.Resources.UpdateFollowersMenuItem1_ClickText3; - - this.RefreshTimeline(); - this.listCache?.PurgeCache(); - this.CurrentListView.Refresh(); - } - catch (WebApiException ex) - { - this.StatusLabel.Text = $"Err:{ex.Message}(RefreshFollowersIds)"; - } - finally - { - this.workerSemaphore.Release(); - } - } - - private async Task RefreshNoRetweetIdsAsync() - { - await this.workerSemaphore.WaitAsync(); - - try - { - this.RefreshTasktrayIcon(); - await this.tw.RefreshNoRetweetIds(); - - this.StatusLabel.Text = "NoRetweetIds refreshed"; - } - catch (WebApiException ex) - { - this.StatusLabel.Text = $"Err:{ex.Message}(RefreshNoRetweetIds)"; - } - finally - { - this.workerSemaphore.Release(); - } - } - - private async Task RefreshBlockIdsAsync() + private async Task RefreshConfigurationAsync() { await this.workerSemaphore.WaitAsync(); try { this.RefreshTasktrayIcon(); - this.StatusLabel.Text = Properties.Resources.UpdateBlockUserText1; + this.StatusLabel.Text = Properties.Resources.RefreshConfiguration_Start; - await this.tw.RefreshBlockIds(); + var loadTasks = + from account in this.accounts.Items + select account.Client.RefreshConfiguration(); - this.StatusLabel.Text = Properties.Resources.UpdateBlockUserText3; - } - catch (WebApiException ex) - { - this.StatusLabel.Text = $"Err:{ex.Message}(RefreshBlockIds)"; - } - finally - { - this.workerSemaphore.Release(); - } - } + await Task.WhenAll(loadTasks); - private async Task RefreshTwitterConfigurationAsync() - { - await this.workerSemaphore.WaitAsync(); - - try - { - this.RefreshTasktrayIcon(); - await this.tw.RefreshConfiguration(); - - if (this.tw.Configuration.PhotoSizeLimit != 0) + var primaryAccount = this.accounts.Primary; + if (primaryAccount is TwitterAccount twAccount) { + this.statuses.RefreshOwl(twAccount.UniqueKey, twAccount.AccountState.FollowerIds, isPrimary: true); + foreach (var (_, service) in this.ImageSelector.Model.MediaServices) { service.UpdateTwitterConfiguration(this.tw.Configuration); } } + foreach (var account in this.accounts.SecondaryAccounts) + { + if (account is TwitterAccount twAccountSecondary) + this.statuses.RefreshOwl(twAccountSecondary.UniqueKey, twAccountSecondary.AccountState.FollowerIds, isPrimary: false); + } + this.listCache?.PurgeCache(); this.CurrentListView.Refresh(); + + this.StatusLabel.Text = Properties.Resources.RefreshConfiguration_Success; } catch (WebApiException ex) { - this.StatusLabel.Text = $"Err:{ex.Message}(RefreshConfiguration)"; + this.StatusLabel.Text = Properties.Resources.RefreshConfiguration_Error + ex.Message; } finally { @@ -1894,23 +1833,6 @@ private async Task RefreshTwitterConfigurationAsync() } } - private async Task RefreshMuteUserIdsAsync() - { - this.StatusLabel.Text = Properties.Resources.UpdateMuteUserIds_Start; - - try - { - await this.tw.RefreshMuteUserIdsAsync(); - } - catch (WebApiException ex) - { - this.StatusLabel.Text = string.Format(Properties.Resources.UpdateMuteUserIds_Error, ex.Message); - return; - } - - this.StatusLabel.Text = Properties.Resources.UpdateMuteUserIds_Finish; - } - private void NotifyIcon1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) @@ -2689,7 +2611,7 @@ private async void SettingStripMenuItem_Click(object sender, EventArgs e) this.SaveConfigsAll(false); if (this.PrimaryAccount.UniqueKey != previousAccountId) - await this.DoGetFollowersMenu(); + await this.RefreshConfigurationAsync(); var currentSecondaryAccounts = this.accounts.SecondaryAccounts; var newSecondaryAccounts = currentSecondaryAccounts @@ -7832,12 +7754,8 @@ private async void TweenMain_Shown(object sender, EventArgs e) { var loadTasks = new TaskCollection(); - loadTasks.Add(new[] + loadTasks.Add(new Func[] { - this.RefreshMuteUserIdsAsync, - this.RefreshBlockIdsAsync, - this.RefreshNoRetweetIdsAsync, - this.RefreshTwitterConfigurationAsync, this.RefreshTabAsync, this.RefreshTabAsync, this.RefreshTabAsync, @@ -7848,7 +7766,7 @@ private async void TweenMain_Shown(object sender, EventArgs e) }); if (this.settings.Common.StartupFollowers) - loadTasks.Add(this.RefreshFollowerIdsAsync); + loadTasks.Add(this.RefreshConfigurationAsync); if (this.settings.Common.GetFav) loadTasks.Add(this.RefreshTabAsync); @@ -7891,20 +7809,6 @@ private async void TweenMain_Shown(object sender, EventArgs e) MessageBox.Show(Properties.Resources.ReAuthorizeText); this.SettingStripMenuItem_Click(this.SettingStripMenuItem, EventArgs.Empty); } - - // 取得失敗の場合は再試行する - var reloadTasks = new TaskCollection(); - - if (!this.tw.GetFollowersSuccess && this.settings.Common.StartupFollowers) - reloadTasks.Add(() => this.RefreshFollowerIdsAsync()); - - if (!this.tw.GetNoRetweetSuccess) - reloadTasks.Add(() => this.RefreshNoRetweetIdsAsync()); - - if (this.tw.Configuration.PhotoSizeLimit == 0) - reloadTasks.Add(() => this.RefreshTwitterConfigurationAsync()); - - await reloadTasks.RunAll(); } this.initial = false; @@ -7920,14 +7824,8 @@ private void StartTimers() this.thumbGenerator.ImgAzyobuziNet.AutoUpdate = true; } - private async Task DoGetFollowersMenu() - { - await this.RefreshFollowerIdsAsync(); - this.DispSelectedPost(true); - } - private async void GetFollowersAllToolStripMenuItem_Click(object sender, EventArgs e) - => await this.DoGetFollowersMenu(); + => await this.RefreshConfigurationAsync(); private void ReTweetUnofficialStripMenuItem_Click(object sender, EventArgs e) => this.DoReTweetUnofficial(); diff --git a/OpenTween/Twitter.cs b/OpenTween/Twitter.cs index 46a7b4694..feb137ff5 100644 --- a/OpenTween/Twitter.cs +++ b/OpenTween/Twitter.cs @@ -162,9 +162,11 @@ public class Twitter : IDisposable public TwitterAccountState AccountState { get; private set; } = new(); - public TwitterConfiguration Configuration { get; private set; } + public TwitterConfiguration Configuration + => this.AccountState.Configuration; - public TwitterTextConfiguration TextConfiguration { get; private set; } + public TwitterTextConfiguration TextConfiguration + => this.AccountState.TextConfiguration; public bool GetFollowersSuccess { get; private set; } = false; @@ -185,8 +187,6 @@ public Twitter(TwitterApi api) this.urlExpander = new(ShortUrl.Instance); this.Api = api; - this.Configuration = TwitterConfiguration.DefaultConfiguration(); - this.TextConfiguration = TwitterTextConfiguration.DefaultConfiguration(); } public TwitterApiAccessLevel AccessLevel @@ -657,7 +657,6 @@ public async Task RefreshFollowerIds() while (cursor != 0); this.AccountState.FollowerIds = newFollowerIds.ToHashSet(); - TabInformations.GetInstance().RefreshOwl(this.AccountState.FollowerIds); this.GetFollowersSuccess = true; } @@ -677,19 +676,6 @@ public async Task RefreshNoRetweetIds() this.GetNoRetweetSuccess = true; } - /// - /// t.co の文字列長などの設定情報を更新します - /// - /// - public async Task RefreshConfiguration() - { - this.Configuration = await this.Api.Configuration() - .ConfigureAwait(false); - - // TextConfiguration 相当の JSON を得る API が存在しないため、TransformedURLLength のみ help/configuration.json に合わせて更新する - this.TextConfiguration.TransformedURLLength = this.Configuration.ShortUrlLengthHttps; - } - public async Task GetListsApi() { this.CheckAccountState();