Fix rapid travel mode, universal commands
This commit is contained in:
@@ -146,6 +146,7 @@ public class NavigationUserCommandHandlerService : UserCommandHandlerServiceBase
|
||||
if (_currentSelectedItem is not IContainerViewModel containerViewModel || containerViewModel.Container is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
_appState.RapidTravelText = "";
|
||||
_selectedTab?.Tab?.SetCurrentLocation(containerViewModel.Container);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
@@ -153,7 +154,12 @@ public class NavigationUserCommandHandlerService : UserCommandHandlerServiceBase
|
||||
private async Task GoUp()
|
||||
{
|
||||
if (_currentLocation?.Parent is not AbsolutePath parentPath ||
|
||||
await parentPath.ResolveAsyncSafe() is not IContainer newContainer) return;
|
||||
await parentPath.ResolveAsyncSafe() is not IContainer newContainer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_appState.RapidTravelText = "";
|
||||
_selectedTab?.Tab?.SetCurrentLocation(newContainer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using FileTime.App.Core.UserCommand;
|
||||
using FileTime.GuiApp.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
@@ -49,7 +50,12 @@ public class KeyboardConfigurationService : IKeyboardConfigurationService
|
||||
|
||||
private static bool IsUniversal(CommandBindingConfiguration keyMapping)
|
||||
{
|
||||
return false;
|
||||
//return keyMapping.Command is ConfigCommand.GoUp or ConfigCommand.Open or ConfigCommand.OpenOrRun or ConfigCommand.MoveCursorUp or ConfigCommand.MoveCursorDown or ConfigCommand.MoveCursorUpPage or ConfigCommand.MoveCursorDownPage;
|
||||
return keyMapping.Command is
|
||||
GoUpCommand.CommandName
|
||||
or OpenSelectedCommand.CommandName
|
||||
or MoveCursorDownCommand.CommandName
|
||||
or MoveCursorDownPageCommand.CommandName
|
||||
or MoveCursorUpCommand.CommandName
|
||||
or MoveCursorUpPageCommand.CommandName;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user