Make drag-and-drop follow Windows Explorer and refresh the tree after folder operations.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-23 16:33:49 +02:00
parent 09a8cfafa3
commit d79605cde9
15 changed files with 879 additions and 58 deletions

View File

@@ -71,12 +71,13 @@ public sealed class TransferQueue : BackgroundService
}
}
public async Task EnqueueDeleteAsync(IReadOnlyList<string> paths, CancellationToken cancellationToken = default)
public async Task EnqueueDeleteAsync(IReadOnlyList<string> paths, bool permanent = false, CancellationToken cancellationToken = default)
{
await EnqueueAsync(new TransferJob
{
Op = TransferOp.Delete,
SourcePath = string.Join("|", paths),
DestinationPath = permanent ? "permanent" : "recycle",
Status = TransferStatus.Queued,
CreatedUtc = DateTimeOffset.UtcNow,
AdditionalSources = paths.ToList()
@@ -291,7 +292,8 @@ public sealed class TransferQueue : BackgroundService
var paths = job.AdditionalSources.Count > 0
? job.AdditionalSources
: job.SourcePath.Split('|', StringSplitOptions.RemoveEmptyEntries);
if (!_shell.DeleteToRecycleBin(paths, out var error))
var recycle = !string.Equals(job.DestinationPath, "permanent", StringComparison.Ordinal);
if (!_shell.Delete(paths, recycle, out var error))
{
job.Status = TransferStatus.Failed;
job.Error = error;