Skip to content

Commit

Permalink
Feature: Add newly created items to Recent Files list (files-communit…
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 committed Jan 15, 2024
1 parent 6a3d1cc commit 16bb923
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Files.App/Helpers/UI/UIFilesystemHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,10 @@ public static async Task CreateFileFromDialogResultTypeAsync(AddItemDialogItemTy
break;
}

if (created.Status == ReturnResult.AccessUnauthorized)
// Add newly created item to recent files list
if (created.Status == ReturnResult.Success && created.Item?.Path is not null)
App.RecentItemsManager.AddToRecentItems(created.Item.Path);
else if (created.Status == ReturnResult.AccessUnauthorized)
{
await DialogDisplayHelper.ShowDialogAsync
(
Expand Down

0 comments on commit 16bb923

Please sign in to comment.