File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -268,14 +268,25 @@ public async void PopulateRecentsList()
268
268
Visibility ItemFolderImgVis ;
269
269
Visibility ItemEmptyImgVis ;
270
270
Visibility ItemFileIconVis ;
271
- if ( mostRecentlyUsed . Entries . Count == 0 )
271
+ bool IsRecentsListEmpty = true ;
272
+ foreach ( var entry in mostRecentlyUsed . Entries )
273
+ {
274
+ var item = await mostRecentlyUsed . GetItemAsync ( entry . Token ) ;
275
+ if ( item . IsOfType ( StorageItemTypes . File ) )
276
+ {
277
+ IsRecentsListEmpty = false ;
278
+ }
279
+ }
280
+
281
+ if ( IsRecentsListEmpty )
272
282
{
273
283
Empty . Visibility = Visibility . Visible ;
274
284
}
275
285
else
276
286
{
277
287
Empty . Visibility = Visibility . Collapsed ;
278
288
}
289
+
279
290
foreach ( Windows . Storage . AccessCache . AccessListEntry entry in mostRecentlyUsed . Entries )
280
291
{
281
292
string mruToken = entry . Token ;
@@ -313,6 +324,11 @@ public async void PopulateRecentsList()
313
324
// Skip item until consent is provided
314
325
}
315
326
}
327
+
328
+ if ( recentItemsCollection . Count == 0 )
329
+ {
330
+ Empty . Visibility = Visibility . Visible ;
331
+ }
316
332
}
317
333
318
334
private async void RecentsView_ItemClick ( object sender , ItemClickEventArgs e )
You can’t perform that action at this time.
0 commit comments