• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

dev


Commit MetaInfo

Revisionba4365440880c4687772323165fdf333a3cfb79a (tree)
Time2014-02-01 06:19:09
AuthorKimura Youichi <kim.upsilon@bucy...>
CommiterKimura Youichi

Log Message

サムネイル画像の取得時にキャンセルされると WebException が正常にハンドルされない場合がある問題を修正

Change Summary

Incremental Difference

--- a/OpenTween/Resources/ChangeLog.txt
+++ b/OpenTween/Resources/ChangeLog.txt
@@ -1,6 +1,7 @@
11 更新履歴
22
33 ==== Ver 1.1.8-beta1(2014/xx/xx)
4+ * FIX: サムネイル画像の取得をキャンセルするとエラーが発生する場合がある問題の修正
45
56 ==== Ver 1.1.7(2014/01/16)
67 * NEW: ダイレクトメッセージに添付された画像のサムネイル表示に対応
--- a/OpenTween/Thumbnail/Services/Pixiv.cs
+++ b/OpenTween/Thumbnail/Services/Pixiv.cs
@@ -61,7 +61,7 @@ namespace OpenTween.Thumbnail.Services
6161 client.Headers[HttpRequestHeader.Referer] = this.ImageUrl;
6262
6363 var task = client.DownloadDataAsync(new Uri(this.ThumbnailUrl), token)
64- .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result), token);
64+ .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result));
6565
6666 task.ContinueWith(_ => client.Dispose());
6767
--- a/OpenTween/Thumbnail/ThumbnailInfo.cs
+++ b/OpenTween/Thumbnail/ThumbnailInfo.cs
@@ -45,7 +45,7 @@ namespace OpenTween.Thumbnail
4545 var client = new OTWebClient();
4646
4747 var task = client.DownloadDataAsync(new Uri(this.ThumbnailUrl), token)
48- .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result), token);
48+ .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result));
4949
5050 task.ContinueWith(_ => client.Dispose());
5151
--- a/OpenTween/TweetThumbnail.cs
+++ b/OpenTween/TweetThumbnail.cs
@@ -90,7 +90,7 @@ namespace OpenTween
9090 .ContinueWith(t2 =>
9191 {
9292 if (t2.IsFaulted)
93- t2.Exception.Flatten().Handle(x => x is WebException || x is InvalidImageException);
93+ t2.Exception.Flatten().Handle(x => x is WebException || x is InvalidImageException || x is TaskCanceledException);
9494
9595 if (t2.IsFaulted || t2.IsCanceled)
9696 {