@@ -483,6 +483,23 @@ public async void LoadExtendedItemProperties(ListedItem item, uint thumbnailSize
483483 matchingItem . LoadFileIcon = true ;
484484 }
485485 }
486+ if ( App . Connection != null )
487+ {
488+ var value = new ValueSet ( ) ;
489+ value . Add ( "Arguments" , "GetIconOverlay" ) ;
490+ value . Add ( "filePath" , matchingItem . ItemPath ) ;
491+ var response = await App . Connection . SendMessageAsync ( value ) ;
492+ var iconOverlay = response . Message . Get ( "IconOverlay" , ( string ) null ) ;
493+ if ( iconOverlay != null )
494+ {
495+ matchingItem . IconOverlay = new BitmapImage ( ) ;
496+ byte [ ] bitmapData = Convert . FromBase64String ( iconOverlay ) ;
497+ using ( var ms = new MemoryStream ( bitmapData ) )
498+ {
499+ await matchingItem . IconOverlay . SetSourceAsync ( ms . AsRandomAccessStream ( ) ) ;
500+ }
501+ }
502+ }
486503 if ( item . IsShortcutItem )
487504 {
488505 // Reset cloud sync status icon
@@ -519,8 +536,8 @@ public async void LoadExtendedItemProperties(ListedItem item, uint thumbnailSize
519536 if ( App . Connection != null )
520537 {
521538 var value = new ValueSet ( ) ;
522- value . Add ( "Arguments" , "CheckCustomIcon " ) ;
523- value . Add ( "folderPath " , matchingItem . ItemPath ) ;
539+ value . Add ( "Arguments" , "GetIconOverlay " ) ;
540+ value . Add ( "filePath " , matchingItem . ItemPath ) ;
524541 var response = await App . Connection . SendMessageAsync ( value ) ;
525542 var hasCustomIcon = ( response . Status == Windows . ApplicationModel . AppService . AppServiceResponseStatus . Success )
526543 && response . Message . Get ( "HasCustomIcon" , false ) ;
@@ -539,6 +556,16 @@ public async void LoadExtendedItemProperties(ListedItem item, uint thumbnailSize
539556 }
540557 }
541558 }
559+ var iconOverlay = response . Message . Get ( "IconOverlay" , ( string ) null ) ;
560+ if ( iconOverlay != null )
561+ {
562+ matchingItem . IconOverlay = new BitmapImage ( ) ;
563+ byte [ ] bitmapData = Convert . FromBase64String ( iconOverlay ) ;
564+ using ( var ms = new MemoryStream ( bitmapData ) )
565+ {
566+ await matchingItem . IconOverlay . SetSourceAsync ( ms . AsRandomAccessStream ( ) ) ;
567+ }
568+ }
542569 }
543570 matchingItem . FolderRelativeId = matchingStorageItem . FolderRelativeId ;
544571 matchingItem . ItemType = matchingStorageItem . DisplayType ;
0 commit comments