Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ViewModels/CommitDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public int ActiveTabIndex
if (value != _sharedData.ActiveTabIndex)
{
_sharedData.ActiveTabIndex = value;
OnPropertyChanged(nameof(ActiveTabIndex));

if (value == 1 && DiffContext == null && _selectedChanges is { Count: 1 })
DiffContext = new DiffContext(_repo.FullPath, new Models.DiffOption(_commit, _selectedChanges[0]));
Expand Down
6 changes: 1 addition & 5 deletions src/Views/CommitDetail.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.LogicalTree;
using Avalonia.Platform.Storage;
using Avalonia.VisualTree;

Expand Down Expand Up @@ -532,11 +531,8 @@ private void OnChangeDoubleTapped(object sender, TappedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail && sender is Grid { DataContext: Models.Change change })
{
var tabControl = this.FindLogicalDescendantOfType<TabControl>();
if (tabControl != null)
tabControl.SelectedIndex = 1;

detail.SelectedChanges = new() { change };
detail.ActiveTabIndex = 1;
}

e.Handled = true;
Expand Down
Loading