OSDN Git Service

PublicSearch,UserTimeline,ListTimeline更新時にエラーが発生しても他のタブの更新は続行する
authorKimura Youichi <kim.upsilon@bucyou.net>
Thu, 19 May 2016 13:21:57 +0000 (22:21 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Fri, 20 May 2016 14:06:26 +0000 (23:06 +0900)
Fixes: 1e8fb318 ("TweenMainクラス内で行っている各タブの更新処理をTabModelの派生クラスに移動")

OpenTween/Tween.cs

index 5ac8bfa..f6e7a11 100644 (file)
@@ -2365,15 +2365,20 @@ namespace OpenTween
             try
             {
                 foreach (var tab in tabs)
-                    await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                {
+                    try
+                    {
+                        await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                    }
+                    catch (WebApiException ex)
+                    {
+                        this._myStatusError = true;
+                        this.StatusLabel.Text = $"Err:{ex.Message}(GetSearch)";
+                    }
+                }
 
                 this.RefreshTimeline();
             }
-            catch (WebApiException ex)
-            {
-                this._myStatusError = true;
-                this.StatusLabel.Text = $"Err:{ex.Message}(GetSearch)";
-            }
             finally
             {
                 this.workerSemaphore.Release();
@@ -2404,15 +2409,20 @@ namespace OpenTween
             try
             {
                 foreach (var tab in tabs)
-                    await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                {
+                    try
+                    {
+                        await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                    }
+                    catch (WebApiException ex)
+                    {
+                        this._myStatusError = true;
+                        this.StatusLabel.Text = $"Err:{ex.Message}(GetUserTimeline)";
+                    }
+                }
 
                 this.RefreshTimeline();
             }
-            catch (WebApiException ex)
-            {
-                this._myStatusError = true;
-                this.StatusLabel.Text = $"Err:{ex.Message}(GetUserTimeline)";
-            }
             finally
             {
                 this.workerSemaphore.Release();
@@ -2443,15 +2453,20 @@ namespace OpenTween
             try
             {
                 foreach (var tab in tabs)
-                    await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                {
+                    try
+                    {
+                        await tab.RefreshAsync(this.tw, loadMore, this._initial, this.workerProgress);
+                    }
+                    catch (WebApiException ex)
+                    {
+                        this._myStatusError = true;
+                        this.StatusLabel.Text = $"Err:{ex.Message}(GetListStatus)";
+                    }
+                }
 
                 this.RefreshTimeline();
             }
-            catch (WebApiException ex)
-            {
-                this._myStatusError = true;
-                this.StatusLabel.Text = $"Err:{ex.Message}(GetListStatus)";
-            }
             finally
             {
                 this.workerSemaphore.Release();