File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 44using Avalonia . Controls . Primitives ;
55using Avalonia . Input ;
66using Avalonia . Interactivity ;
7- using Avalonia . VisualTree ;
87
98namespace SourceGit . Views
109{
@@ -16,9 +15,7 @@ protected override void OnPointerPressed(PointerPressedEventArgs e)
1615 {
1716 if ( e . GetCurrentPoint ( this ) . Properties . IsLeftButtonPressed &&
1817 DataContext is ViewModels . RepositoryNode { IsRepository : false } node )
19- {
2018 ViewModels . Welcome . Instance . ToggleNodeIsExpanded ( node ) ;
21- }
2219
2320 e . Handled = true ;
2421 }
@@ -41,10 +38,7 @@ protected override void OnKeyDown(KeyEventArgs e)
4138 {
4239 if ( e . Key == Key . Enter )
4340 {
44- var parent = this . FindAncestorOfType < Launcher > ( ) ;
45- if ( parent is { DataContext : ViewModels . Launcher launcher } )
46- launcher . OpenRepositoryInTab ( node , null ) ;
47-
41+ node . Open ( ) ;
4842 e . Handled = true ;
4943 }
5044 }
@@ -376,15 +370,9 @@ private void OnDoubleTappedTreeNode(object sender, TappedEventArgs e)
376370 if ( sender is Grid { DataContext : ViewModels . RepositoryNode node } )
377371 {
378372 if ( node . IsRepository )
379- {
380- var parent = this . FindAncestorOfType < Launcher > ( ) ;
381- if ( parent is { DataContext : ViewModels . Launcher launcher } )
382- launcher . OpenRepositoryInTab ( node , null ) ;
383- }
373+ node . Open ( ) ;
384374 else
385- {
386375 ViewModels . Welcome . Instance . ToggleNodeIsExpanded ( node ) ;
387- }
388376
389377 e . Handled = true ;
390378 }
You can’t perform that action at this time.
0 commit comments