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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user