File tree Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Expand file tree Collapse file tree 2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -1072,9 +1072,10 @@ await FilesystemTasks.Wrap(() => CoreApplication.MainView.DispatcherQueue.Enqueu
1072
1072
private async Task < ImageSource > GetItemTypeGroupIcon ( ListedItem item , BaseStorageFile matchingStorageItem = null )
1073
1073
{
1074
1074
ImageSource groupImage = null ;
1075
- if ( item . PrimaryItemAttribute != StorageItemTypes . Folder )
1075
+ if ( item . PrimaryItemAttribute != StorageItemTypes . Folder || item . IsZipItem )
1076
1076
{
1077
- var headerIconInfo = await FileThumbnailHelper . LoadIconFromPathAsync ( item . ItemPath , 76 , ThumbnailMode . ListView ) ;
1077
+ var headerIconInfo = await FileThumbnailHelper . LoadIconWithoutOverlayAsync ( item . ItemPath , 64u ) ;
1078
+
1078
1079
if ( headerIconInfo != null && ! item . IsShortcutItem )
1079
1080
{
1080
1081
groupImage = await CoreApplication . MainView . DispatcherQueue . EnqueueAsync ( ( ) => headerIconInfo . ToBitmapAsync ( ) , Windows . System . DispatcherQueuePriority . Low ) ;
Original file line number Diff line number Diff line change @@ -30,21 +30,10 @@ public ImageSource ImageSource
30
30
31
31
public override async Task < List < FileProperty > > LoadPreviewAndDetails ( )
32
32
{
33
- FileRandomAccessStream stream = ( FileRandomAccessStream ) await Item . ItemFile . OpenAsync ( FileAccessMode . Read ) ;
34
-
35
- // svg files require a different type of source
36
- if ( ! Item . ItemPath . EndsWith ( ".svg" ) )
37
- {
38
- var bitmap = new BitmapImage ( ) ;
39
- ImageSource = bitmap ;
40
- await bitmap . SetSourceAsync ( stream ) ;
41
- }
42
- else
43
- {
44
- var bitmap = new SvgImageSource ( ) ;
45
- ImageSource = bitmap ;
46
- await bitmap . SetSourceAsync ( stream ) ;
47
- }
33
+ IRandomAccessStream stream = await Item . ItemFile . OpenAsync ( FileAccessMode . Read ) ;
34
+ BitmapImage bitmap = new ( ) ;
35
+ await bitmap . SetSourceAsync ( stream ) ;
36
+ ImageSource = bitmap ;
48
37
49
38
return new List < FileProperty > ( ) ;
50
39
}
You can’t perform that action at this time.
0 commit comments