Skip to content

Commit

Permalink
表示中のタブを切り替えるとレートリミットの情報が表示されなくなる不具合を修正
Browse files Browse the repository at this point in the history
Fixes: f2ae968 ("MyCommon.TwitterRateLimitsを廃止しアカウントごとにレートリミットを把握できるようにする")
  • Loading branch information
upsilon committed May 23, 2024
1 parent ae93259 commit 4483f02
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions OpenTween/Tween.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3056,7 +3056,7 @@ private void ListTab_SelectedIndexChanged(object sender, EventArgs e)
{
this.SetMainWindowTitle();
this.SetStatusLabelUrl();
this.SetApiStatusLabel(null);
this.SetApiStatusLabel(this.CurrentTabAccount.AccountState.RateLimits);
if (this.ListTab.Focused || ((Control)this.CurrentTabPage.Tag).Focused)
this.Tag = this.ListTab.Tag;
this.TabMenuControl(this.CurrentTabName);
Expand Down Expand Up @@ -6850,15 +6850,8 @@ private async void TwitterApiStatus_AccessLimitUpdated(RateLimitCollection sende
}
}

private void SetApiStatusLabel(RateLimitCollection? rateLimits, string? endpointName = null)
private void SetApiStatusLabel(RateLimitCollection rateLimits, string? endpointName = null)
{
if (rateLimits == null)
{
this.toolStripApiGauge.ApiLimit = null;
this.toolStripApiGauge.ApiEndpoint = endpointName;
return;
}

var tabType = this.CurrentTab.TabType;

if (endpointName == null)
Expand Down

0 comments on commit 4483f02

Please sign in to comment.