Remove Unload on chahnge location/selected item

This commit is contained in:
2022-02-08 11:30:35 +01:00
parent 552362c6b3
commit dda636fd9c

View File

@@ -72,10 +72,6 @@ namespace FileTime.Avalonia.Application
{
if (_selectedItem != value)
{
if(_selectedItem is ContainerViewModel containerVM)
{
containerVM.Unload(unloadParent: false);
}
_selectedItem = value;
if (value is ElementViewModel elementViewModel)
@@ -139,7 +135,6 @@ namespace FileTime.Avalonia.Application
private async Task Tab_CurrentLocationChanged(object? sender, AsyncEventArgs e, CancellationToken token = default)
{
CurrentLocation.Unload(true);
var currentLocation = await Tab.GetCurrentLocation(token);
var parent = GenerateParent(currentLocation);
CurrentLocation = new ContainerViewModel(this, parent, currentLocation, ItemNameConverterService);