Skip to content

Commit 079091b

Browse files
authored
Fix: Fixed issue where drives sometimes had the wrong thumbnail (#12275)
1 parent 285b111 commit 079091b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Files.App/Data/Items/DriveItem.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ public async Task LoadThumbnailAsync(bool isSidebar = false)
249249
if (!string.IsNullOrEmpty(DeviceID) && !string.Equals(DeviceID, "network-folder"))
250250
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 24);
251251

252+
using var thumbnail = await DriveHelpers.GetThumbnailAsync(Root);
253+
IconData ??= await thumbnail.ToByteArrayAsync();
254+
252255
IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.Folder).IconData;
253256
}
254257

0 commit comments

Comments
 (0)