@@ -762,7 +762,6 @@ await CoreApplication.MainView.DispatcherQueue.EnqueueAsync(() =>
762
762
{
763
763
await OrderFilesAndFoldersAsync ( ) ;
764
764
await ApplySingleFileChangeAsync ( item ) ;
765
- //await SaveCurrentListToCacheAsync(WorkingDirectory);
766
765
}
767
766
}
768
767
var syncStatus = await CheckCloudDriveSyncStatusAsync ( matchingStorageItem ) ;
@@ -885,7 +884,10 @@ private async void RapidAddItemsToCollectionAsync(string path, string previousDi
885
884
{
886
885
for ( var i = 0 ; i < cacheEntry . FileList . Count ; i ++ )
887
886
{
888
- filesAndFolders . Add ( cacheEntry . FileList [ i ] ) ;
887
+ if ( ! cacheEntry . FileList [ i ] . IsHiddenItem || AppSettings . AreHiddenItemsVisible )
888
+ {
889
+ filesAndFolders . Add ( cacheEntry . FileList [ i ] ) ;
890
+ }
889
891
if ( addFilesCTS . IsCancellationRequested )
890
892
{
891
893
break ;
@@ -901,6 +903,10 @@ private async void RapidAddItemsToCollectionAsync(string path, string previousDi
901
903
}
902
904
return null ;
903
905
} ) ;
906
+ if ( cacheResult != null )
907
+ {
908
+ IsLoadingItems = false ;
909
+ }
904
910
}
905
911
906
912
if ( path . StartsWith ( AppSettings . RecycleBinPath ) ||
@@ -1242,11 +1248,7 @@ await DialogDisplayHelper.ShowDialogAsync(
1242
1248
if ( cacheOnly )
1243
1249
{
1244
1250
fileList = await Win32StorageEnumerator . ListEntries ( path , returnformat , hFile , findData , Connection , cancellationToken , skipItems , 32 , null ) ;
1245
- await fileListCache . SaveFileListToCache ( path , new CacheEntry
1246
- {
1247
- CurrentFolder = currentFolder ,
1248
- FileList = fileList
1249
- } ) ;
1251
+ await SaveFileListToCacheAsync ( path , fileList ) ;
1250
1252
}
1251
1253
else
1252
1254
{
@@ -1276,12 +1278,7 @@ await DialogDisplayHelper.ShowDialogAsync(
1276
1278
{
1277
1279
if ( ! addFilesCTS . IsCancellationRequested )
1278
1280
{
1279
- await fileListCache . SaveFileListToCache ( path , new CacheEntry
1280
- {
1281
- CurrentFolder = CurrentFolder ,
1282
- // since filesAndFolders could be mutated, memory cache needs a copy of current list
1283
- FileList = filesAndFolders . ToList ( )
1284
- } ) ;
1281
+ await SaveFileListToCacheAsync ( path , filesAndFolders ) ;
1285
1282
}
1286
1283
else
1287
1284
{
@@ -1313,11 +1310,7 @@ private async Task EnumFromStorageFolderAsync(string path, ListedItem currentFol
1313
1310
null ,
1314
1311
32 ,
1315
1312
null ) ;
1316
- await fileListCache . SaveFileListToCache ( path , new CacheEntry
1317
- {
1318
- CurrentFolder = currentFolder ,
1319
- FileList = finalList
1320
- } ) ;
1313
+ await SaveFileListToCacheAsync ( path , finalList ) ;
1321
1314
}
1322
1315
else
1323
1316
{
@@ -1354,7 +1347,7 @@ private async Task EnumFromStorageFolderAsync(string path, ListedItem currentFol
1354
1347
{
1355
1348
if ( ! addFilesCTS . IsCancellationRequested )
1356
1349
{
1357
- await SaveCurrentListToCacheAsync ( path ) ;
1350
+ await SaveFileListToCacheAsync ( path , filesAndFolders ) ;
1358
1351
}
1359
1352
else
1360
1353
{
@@ -1547,7 +1540,7 @@ private async void ProcessOperationQueue(CancellationToken cancellationToken)
1547
1540
1548
1541
await OrderFilesAndFoldersAsync ( ) ;
1549
1542
await ApplyFilesAndFoldersChangesAsync ( ) ;
1550
- await SaveCurrentListToCacheAsync ( WorkingDirectory ) ;
1543
+ await SaveFileListToCacheAsync ( WorkingDirectory , filesAndFolders ) ;
1551
1544
}
1552
1545
}
1553
1546
catch
@@ -1747,13 +1740,13 @@ private async Task UpdateFileOrFolderAsync(string path)
1747
1740
}
1748
1741
}
1749
1742
1750
- private Task SaveCurrentListToCacheAsync ( string path )
1743
+ private Task SaveFileListToCacheAsync ( string path , IEnumerable < ListedItem > fileList )
1751
1744
{
1752
1745
return fileListCache . SaveFileListToCache ( path , new CacheEntry
1753
1746
{
1754
1747
CurrentFolder = CurrentFolder ,
1755
1748
// since filesAndFolders could be mutated, memory cache needs a copy of current list
1756
- FileList = filesAndFolders . Take ( 32 ) . ToList ( )
1749
+ FileList = fileList . Take ( 32 ) . ToList ( )
1757
1750
} ) ;
1758
1751
}
1759
1752
0 commit comments