Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Files.App/Data/Items/DriveItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Files.Core.Storage.Enums;
using Files.Core.Storage.LocatableStorage;
using Files.Core.Storage.NestedStorage;
using Microsoft.UI.Dispatching;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Imaging;
Expand Down Expand Up @@ -293,13 +292,17 @@ public async Task LoadThumbnailAsync(bool isSidebar = false)
else
{
if (!string.IsNullOrEmpty(DeviceID) && !string.Equals(DeviceID, "network-folder"))
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 24);
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 16);

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

if (string.Equals(DeviceID, "network-folder"))
IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.NetworkDrives).IconData;

IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.Folder).IconData;
}
Icon ??= await IconData.ToBitmapAsync();
Expand Down