Added file editor to the api. Made the entire file manager available to the interfaces.

This commit is contained in:
Marcel Baumgartner
2024-03-30 22:39:28 +01:00
parent cdc2954d0b
commit 5d9c32a196
10 changed files with 20 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ public class RenameContextAction : IFileManagerContextAction
public string Color => "info";
public Func<FileEntry, bool> Filter => _ => true;
public async Task Execute(BaseFileAccess access, FileView view, FileEntry entry, IServiceProvider provider)
public async Task Execute(BaseFileAccess access, UI.NewFileManager.FileManager fileManager, FileEntry entry, IServiceProvider provider)
{
var alertService = provider.GetRequiredService<AlertService>();
var toastService = provider.GetRequiredService<ToastService>();
@@ -24,7 +24,7 @@ public class RenameContextAction : IFileManagerContextAction
await access.Rename(entry.Name, newName);
await view.Refresh();
await fileManager.View.Refresh();
await toastService.Success("Successfully renamed file");
}
}