OSDN Git Service

サムネイル画像のロード処理が UI スレッド上で行われてしまう問題の修正
authorKimura Youichi <kim.upsilon@bucyou.net>
Fri, 31 Jan 2014 20:53:29 +0000 (05:53 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Fri, 31 Jan 2014 21:19:12 +0000 (06:19 +0900)
OpenTween/Resources/ChangeLog.txt
OpenTween/Thumbnail/Services/Pixiv.cs
OpenTween/Thumbnail/ThumbnailInfo.cs

index c52c002..522348d 100644 (file)
@@ -2,6 +2,7 @@
 
 ==== Ver 1.1.8-beta1(2014/xx/xx)
  * FIX: サムネイル画像の取得をキャンセルするとエラーが発生する場合がある問題の修正
+ * FIX: サムネイル画像の読み込み中に画面の更新が遅くなる問題の修正
 
 ==== Ver 1.1.7(2014/01/16)
  * NEW: ダイレクトメッセージに添付された画像のサムネイル表示に対応
index 5b3b4a8..4308962 100644 (file)
@@ -61,7 +61,7 @@ namespace OpenTween.Thumbnail.Services
                 client.Headers[HttpRequestHeader.Referer] = this.ImageUrl;
 
                 var task = client.DownloadDataAsync(new Uri(this.ThumbnailUrl), token)
-                    .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result));
+                    .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result), TaskScheduler.Default);
 
                 task.ContinueWith(_ => client.Dispose());
 
index 4c90644..419588e 100644 (file)
@@ -45,7 +45,7 @@ namespace OpenTween.Thumbnail
             var client = new OTWebClient();
 
             var task = client.DownloadDataAsync(new Uri(this.ThumbnailUrl), token)
-                .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result));
+                .ContinueWith(t => MemoryImage.CopyFromBytes(t.Result), TaskScheduler.Default);
 
             task.ContinueWith(_ => client.Dispose());