Skip to content

Commit 007f6fb

Browse files
authored
Feature: Load network icon instead of a folder icon (#13226)
1 parent ca619d1 commit 007f6fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using Files.Core.Storage.Enums;
77
using Files.Core.Storage.LocatableStorage;
88
using Files.Core.Storage.NestedStorage;
9-
using Microsoft.UI.Dispatching;
109
using Microsoft.UI.Xaml;
1110
using Microsoft.UI.Xaml.Controls;
1211
using Microsoft.UI.Xaml.Media.Imaging;
@@ -293,13 +292,17 @@ public async Task LoadThumbnailAsync(bool isSidebar = false)
293292
else
294293
{
295294
if (!string.IsNullOrEmpty(DeviceID) && !string.Equals(DeviceID, "network-folder"))
296-
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 24);
295+
IconData ??= await FileThumbnailHelper.LoadIconWithoutOverlayAsync(DeviceID, 16);
297296

298297
if (Root is not null)
299298
{
300299
using var thumbnail = await DriveHelpers.GetThumbnailAsync(Root);
301300
IconData ??= await thumbnail.ToByteArrayAsync();
302301
}
302+
303+
if (string.Equals(DeviceID, "network-folder"))
304+
IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.NetworkDrives).IconData;
305+
303306
IconData ??= UIHelpers.GetSidebarIconResourceInfo(Constants.ImageRes.Folder).IconData;
304307
}
305308
Icon ??= await IconData.ToBitmapAsync();

0 commit comments

Comments
 (0)