Tab restore

This commit is contained in:
2022-05-24 17:02:36 +02:00
parent dcff003c28
commit 8167909781
16 changed files with 339 additions and 11 deletions

View File

@@ -43,7 +43,8 @@ public partial class TabViewModel : ITabViewModel
null!;
public IObservable<IReadOnlyCollection<IItemViewModel>?>
SelectedsChildrenCollectionObservable { get; private set; } = null!;
SelectedsChildrenCollectionObservable
{ get; private set; } = null!;
[Property] private BindedCollection<IItemViewModel>? _currentItemsCollection;
@@ -51,6 +52,8 @@ public partial class TabViewModel : ITabViewModel
[Property] private BindedCollection<IItemViewModel>? _selectedsChildrenCollection;
public IContainer? CachedCurrentLocation { get; private set; }
public TabViewModel(
IServiceProvider serviceProvider,
IItemNameConverterService itemNameConverterService,
@@ -74,6 +77,8 @@ public partial class TabViewModel : ITabViewModel
tab.AddToDisposables(_disposables);
CurrentLocation = tab.CurrentLocation.AsObservable();
CurrentLocation.Subscribe(l => CachedCurrentLocation = l).AddToDisposables(_disposables);
CurrentItems = tab.CurrentItems
.Select(items => items?.Transform(i => MapItemToViewModel(i, ItemViewModelType.Main)))
/*.ObserveOn(_rxSchedulerService.GetWorkerScheduler())