File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
src/Files.App/DataModels/NavigationControlItems Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 9
9
using Microsoft . UI . Xaml . Media . Imaging ;
10
10
using System ;
11
11
using System . Threading . Tasks ;
12
+ using Windows . Media . Capture ;
12
13
using Windows . Storage ;
13
14
using Windows . Storage . Streams ;
15
+ using static Vanara . PInvoke . Shell32 ;
14
16
15
17
namespace Files . App . DataModels . NavigationControlItems
16
18
{
@@ -223,14 +225,10 @@ public async Task LoadDriveIcon()
223
225
{
224
226
if ( IconData is null )
225
227
{
226
- if ( ! string . IsNullOrEmpty ( DeviceID ) )
228
+ if ( ! string . IsNullOrEmpty ( DeviceID ) && ! string . Equals ( DeviceID , "network-folder" ) )
227
229
IconData = await FileThumbnailHelper . LoadIconWithoutOverlayAsync ( DeviceID , 24 ) ;
228
-
229
- if ( IconData is null )
230
- {
231
- var resource = UIHelpers . GetIconResourceInfo ( Constants . ImageRes . Folder ) ;
232
- IconData = resource ? . IconData ;
233
- }
230
+
231
+ IconData ??= UIHelpers . GetIconResourceInfo ( Constants . ImageRes . Folder ) . IconData ;
234
232
}
235
233
Icon = await IconData . ToBitmapAsync ( ) ;
236
234
}
@@ -257,4 +255,4 @@ public enum DriveType
257
255
VirtualDrive ,
258
256
CloudDrive ,
259
257
}
260
- }
258
+ }
You can’t perform that action at this time.
0 commit comments