Show folder names immediately and refresh stale index sizes without walking the whole drive.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-26 11:21:20 +02:00
parent 6fc7506eb7
commit e2916aef9c
88 changed files with 5373 additions and 544 deletions

View File

@@ -1,3 +1,4 @@
using Explorer.Application;
using Explorer.Contracts;
using Explorer.Domain;
using Explorer.Domain.Abstractions;
@@ -6,7 +7,7 @@ using Microsoft.Extensions.Logging;
namespace Explorer.FileOperations;
public sealed class TransferQueue : BackgroundService, ITransferHost
public sealed class TransferQueue : BackgroundService, ITransferHost, IForegroundWorkSignal
{
private readonly IOperationExecutor _executor;
private readonly IIndexStore _store;
@@ -41,6 +42,15 @@ public sealed class TransferQueue : BackgroundService, ITransferHost
public bool IsPaused => _queuePaused;
public bool HasForegroundWork()
{
lock (_gate)
{
return _jobs.Any(j => j.Status is TransferStatus.Queued or TransferStatus.Running
or TransferStatus.Cancelling or TransferStatus.Waiting);
}
}
public IReadOnlyList<TransferJob> Snapshot()
{
lock (_gate)