Timeless refactor

This commit is contained in:
2022-05-21 14:30:24 +02:00
parent ced0c88a10
commit 6ee5afa632
47 changed files with 571 additions and 181 deletions

View File

@@ -74,12 +74,12 @@ public partial class MainWindow : Window
&& e.GetCurrentPoint(this).Properties.IsLeftButtonPressed
&& sender is StyledElement control)
{
IAbsolutePath? path = null;
if (control.DataContext is IHaveAbsolutePath { Path: { } } haveAbsolutePath)
FullName? path = null;
if (control.DataContext is IHaveFullPath { Path: { } } hasFullPath)
{
path = haveAbsolutePath.Path;
path = hasFullPath.Path;
}
else if (control.DataContext is IAbsolutePath p)
else if (control.DataContext is FullName p)
{
path = p;
}
@@ -97,10 +97,7 @@ public partial class MainWindow : Window
if (path is null) return;
var resolvedItem = await path.ResolveAsync();
if (resolvedItem is not IContainer resolvedContainer) return;
await ViewModel.UserCommandHandlerService.HandleCommandAsync(
new OpenContainerCommand(new AbsolutePath(resolvedContainer)));
await ViewModel.OpenContainerByFullName(path);
e.Handled = true;
}
}