Incremental item loading, movement does not respect order

This commit is contained in:
2023-02-22 23:09:40 +01:00
parent 3dccaa5243
commit 188b9593ce
6 changed files with 91 additions and 25 deletions

View File

@@ -26,7 +26,14 @@ public record Container(
ReadOnlyExtensionCollection Extensions,
IObservable<IObservable<IChangeSet<AbsolutePath, string>>?> Items) : IContainer
{
BehaviorSubject<bool> IsLoading { get; } = new(false);
private readonly CancellationTokenSource _loadingCancellationTokenSource = new();
public CancellationToken LoadingCancellationToken => _loadingCancellationTokenSource.Token;
public BehaviorSubject<bool> IsLoading { get; } = new(false);
IObservable<bool> IContainer.IsLoading => IsLoading.AsObservable();
public AbsolutePathType Type => AbsolutePathType.Container;
public void CancelLoading()
{
_loadingCancellationTokenSource.Cancel();
}
}