OSDN Git Service

APIリミット表示の更新を /statuses/home_timeline が使用された時のみにする
authorKimura Youichi <kim.upsilon@bucyou.net>
Wed, 5 Jun 2013 19:21:31 +0000 (04:21 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Thu, 6 Jun 2013 22:05:08 +0000 (07:05 +0900)
OpenTween/Tween.cs

index 477cc99..0a1e4f7 100644 (file)
@@ -9490,7 +9490,11 @@ namespace OpenTween
                 {
                     if (sender is TwitterApiStatus11 && this._apiGauge.API11Enabled)
                     {
-                        this._apiGauge.ApiLimit = MyCommon.TwitterApiInfo11.AccessLimit["/statuses/home_timeline"];
+                        var endpointName = (e as TwitterApiStatus11.AccessLimitUpdatedEventArgs).EndpointName;
+                        if (endpointName == "/statuses/home_timeline")
+                        {
+                            this._apiGauge.ApiLimit = MyCommon.TwitterApiInfo11.AccessLimit["/statuses/home_timeline"];
+                        }
                     }
                     else if (sender is TwitterApiStatus && !this._apiGauge.API11Enabled)
                     {