Ruben 2 роки тому
батько
коміт
8ee1ff6733

+ 2 - 2
src/PicView/ChangeImage/LoadPic.cs

@@ -361,7 +361,7 @@ namespace PicView.ChangeImage
         /// </summary>
         /// <param name="index">The index of the image to load.</param>
         /// <param name="fileInfo">The file information for the image. If not specified, the file information will be obtained from the image list using the specified index.</param>
-        internal static async Task LoadPicAtIndexAsync(int index, FileInfo? fileInfo = null)
+        internal static async Task LoadPicAtIndexAsync(int index, FileInfo? fileInfo = null) => await Task.Run(async () =>
         {
             if (index < 0 || index >= Pics.Count)
             {
@@ -575,7 +575,7 @@ namespace PicView.ChangeImage
                 }
                 await LoadPicAtIndexAsync(nextIndex).ConfigureAwait(false);
             }
-        }
+        });
 
         #endregion Load Pic at Index
 

+ 1 - 0
src/PicView/PicGallery/GalleryLoad.cs

@@ -223,6 +223,7 @@ namespace PicView.PicGallery
             {
                 await Parallel.ForAsync(startPosition, end, options, async (i, loopState) =>
                 {
+                    Thread.CurrentThread.Priority = ThreadPriority.BelowNormal;
                     updates++;
                     try
                     {