fix(ui): default-expand diff tree; reliable row-click toggle

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-19 11:50:36 +02:00
parent 232d7cb647
commit 7e3ae704fe
3 changed files with 8 additions and 3 deletions

View File

@@ -62,9 +62,8 @@ public partial class WorktreeModalView : Window
if (sender is not Control c) return;
if (c.DataContext is not WorktreeNodeViewModel node) return;
if (!node.IsDirectory) return;
var tvi = c.FindAncestorOfType<TreeViewItem>();
if (tvi is null) return;
tvi.IsExpanded = !tvi.IsExpanded;
node.IsExpanded = !node.IsExpanded;
e.Handled = true;
}
private void OnTitleBarPressed(object? sender, PointerPressedEventArgs e)