Skip to content

Commit

Permalink
Fix: Fixed issue where certain drive icons didn't load on the home pa…
Browse files Browse the repository at this point in the history
…ge widget (#14961)
  • Loading branch information
ferrariofilippo committed Mar 21, 2024
1 parent a9c24b4 commit cb822b1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Files.App/Data/Items/WidgetDriveCardItem.cs
Expand Up @@ -32,6 +32,12 @@ public async Task LoadCardThumbnailAsync()
true,
IconOptions.ReturnIconOnly | IconOptions.UseCurrentScale);

if (result is null)
{
using var thumbnail = await DriveHelpers.GetThumbnailAsync(Item.Root);
result ??= await thumbnail.ToByteArrayAsync();
}

thumbnailData = result;

var bitmapImage = await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(() => thumbnailData.ToBitmapAsync(), Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal);
Expand Down

0 comments on commit cb822b1

Please sign in to comment.