@@ -974,7 +974,9 @@ await dispatcherQueue.EnqueueOrInvokeAsync(async () =>
974
974
getThumbnailOnly ,
975
975
getIconOnly ? IconOptions . ReturnIconOnly : IconOptions . None ) ;
976
976
977
- cancellationTokenSource . Token . ThrowIfCancellationRequested ( ) ;
977
+ if ( cancellationTokenSource . Token . IsCancellationRequested )
978
+ break ;
979
+
978
980
await Task . Delay ( 500 ) ;
979
981
}
980
982
}
@@ -1090,13 +1092,12 @@ await Task.Run(async () =>
1090
1092
}
1091
1093
1092
1094
cts . Token . ThrowIfCancellationRequested ( ) ;
1093
- await LoadItemThumbnailAsync ( item ) ;
1095
+ _ = LoadItemThumbnailAsync ( item ) ;
1094
1096
1095
1097
if ( item . IsLibrary || item . PrimaryItemAttribute == StorageItemTypes . File || item . IsArchive )
1096
1098
{
1097
1099
if ( ! item . IsShortcut && ! item . IsHiddenItem && ! FtpHelpers . IsFtpPath ( item . ItemPath ) )
1098
1100
{
1099
- cts . Token . ThrowIfCancellationRequested ( ) ;
1100
1101
matchingStorageFile = await GetFileFromPathAsync ( item . ItemPath , cts . Token ) ;
1101
1102
if ( matchingStorageFile is not null )
1102
1103
{
@@ -1129,7 +1130,6 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() =>
1129
1130
{
1130
1131
if ( ! item . IsShortcut && ! item . IsHiddenItem && ! FtpHelpers . IsFtpPath ( item . ItemPath ) )
1131
1132
{
1132
- cts . Token . ThrowIfCancellationRequested ( ) ;
1133
1133
BaseStorageFolder matchingStorageFolder = await GetFolderFromPathAsync ( item . ItemPath , cts . Token ) ;
1134
1134
if ( matchingStorageFolder is not null )
1135
1135
{
@@ -1172,10 +1172,7 @@ await dispatcherQueue.EnqueueOrInvokeAsync(() =>
1172
1172
}
1173
1173
1174
1174
if ( loadGroupHeaderInfo && isFileTypeGroupMode )
1175
- {
1176
- cts . Token . ThrowIfCancellationRequested ( ) ;
1177
1175
groupImage = await GetItemTypeGroupIcon ( item , matchingStorageFile ) ;
1178
- }
1179
1176
}
1180
1177
catch ( Exception )
1181
1178
{
0 commit comments