Skip to content

Commit 16bb923

Browse files
authored
Feature: Add newly created items to Recent Files list (#14466)
1 parent 6a3d1cc commit 16bb923

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Files.App/Helpers/UI/UIFilesystemHelpers.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,10 @@ public static async Task CreateFileFromDialogResultTypeAsync(AddItemDialogItemTy
324324
break;
325325
}
326326

327-
if (created.Status == ReturnResult.AccessUnauthorized)
327+
// Add newly created item to recent files list
328+
if (created.Status == ReturnResult.Success && created.Item?.Path is not null)
329+
App.RecentItemsManager.AddToRecentItems(created.Item.Path);
330+
else if (created.Status == ReturnResult.AccessUnauthorized)
328331
{
329332
await DialogDisplayHelper.ShowDialogAsync
330333
(

0 commit comments

Comments
 (0)