MainWindow skeleton
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using System.Reactive.Linq;
|
||||
using System.Reactive.Subjects;
|
||||
using FileTime.Core.Enums;
|
||||
using FileTime.Core.Models;
|
||||
|
||||
@@ -5,9 +7,9 @@ namespace FileTime.Core.Services
|
||||
{
|
||||
public abstract class ContentProviderBase : IContentProvider
|
||||
{
|
||||
protected List<IAbsolutePath> Items { get; set; } = new List<IAbsolutePath>();
|
||||
protected BehaviorSubject<IReadOnlyList<IAbsolutePath>> Items { get; } = new BehaviorSubject<IReadOnlyList<IAbsolutePath>>(new List<IAbsolutePath>());
|
||||
|
||||
IReadOnlyList<IAbsolutePath> IContainer.Items => Items;
|
||||
IObservable<IReadOnlyList<IAbsolutePath>> IContainer.Items => Items;
|
||||
|
||||
public string Name { get; }
|
||||
|
||||
@@ -33,6 +35,10 @@ namespace FileTime.Core.Services
|
||||
|
||||
public string? Attributes => null;
|
||||
|
||||
protected BehaviorSubject<bool> IsLoading { get; } = new(false);
|
||||
|
||||
IObservable<bool> IContainer.IsLoading => IsLoading.AsObservable();
|
||||
|
||||
protected ContentProviderBase(string name)
|
||||
{
|
||||
DisplayName = Name = name;
|
||||
|
||||
Reference in New Issue
Block a user