Move check for png thubmnail loading priority

This commit is contained in:
Samuel Chapleau 2023-01-13 14:20:10 -08:00
parent ef944a234f
commit 645e798d97

View File

@ -124,14 +124,15 @@ namespace Peek.FilePreviewer.Previewers
{
cancellationToken.ThrowIfCancellationRequested();
if (!IsFullImageLoaded)
await Dispatcher.RunOnUiThread(async () =>
{
await Dispatcher.RunOnUiThread(async () =>
cancellationToken.ThrowIfCancellationRequested();
var thumbnail = await ThumbnailHelper.GetThumbnailAsync(File, _png_image_size);
if (!IsFullImageLoaded)
{
cancellationToken.ThrowIfCancellationRequested();
Preview = await ThumbnailHelper.GetThumbnailAsync(File, _png_image_size);
});
}
Preview = thumbnail;
}
});
});
}