enhance: use SelectedItem instead of SelectedItems since the selection mode is Single
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

This commit is contained in:
leo 2024-09-22 20:53:11 +08:00
parent 07cba1cf5f
commit dd6ee6b8e6
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ namespace SourceGit.Views
protected override void OnKeyDown(KeyEventArgs e)
{
if (SelectedItems is [ViewModels.RevisionFileTreeNode { IsFolder: true } node] && e.KeyModifiers == KeyModifiers.None)
if (SelectedItem is ViewModels.RevisionFileTreeNode { IsFolder: true } node && e.KeyModifiers == KeyModifiers.None)
{
if ((node.IsExpanded && e.Key == Key.Left) || (!node.IsExpanded && e.Key == Key.Right))
{

View file

@ -32,7 +32,7 @@ namespace SourceGit.Views
protected override void OnKeyDown(KeyEventArgs e)
{
if (SelectedItems is [ViewModels.RepositoryNode { IsRepository: false } node] && e.KeyModifiers == KeyModifiers.None)
if (SelectedItem is ViewModels.RepositoryNode { IsRepository: false } node && e.KeyModifiers == KeyModifiers.None)
{
if ((node.IsExpanded && e.Key == Key.Left) || (!node.IsExpanded && e.Key == Key.Right))
{