From 408ece148ef309d926370d1d3a1cd8c416e8514e Mon Sep 17 00:00:00 2001 From: goran-w Date: Sun, 17 Nov 2024 23:24:04 +0100 Subject: [PATCH] Added ToggleTwoSideDiff(), so we can refresh change-block indicator --- src/ViewModels/DiffContext.cs | 6 ++++++ src/Views/DiffView.axaml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ViewModels/DiffContext.cs b/src/ViewModels/DiffContext.cs index 9d3486a1..05e9d833 100644 --- a/src/ViewModels/DiffContext.cs +++ b/src/ViewModels/DiffContext.cs @@ -145,6 +145,12 @@ namespace SourceGit.ViewModels LoadDiffContent(); } + public void ToggleTwoSideDiff() + { + Preference.Instance.UseSideBySideDiff = !Preference.Instance.UseSideBySideDiff; + RefreshChangeBlockIndicator(); + } + public void OpenExternalMergeTool() { var toolType = Preference.Instance.ExternalMergeToolType; diff --git a/src/Views/DiffView.axaml b/src/Views/DiffView.axaml index e904f4a4..c555e903 100644 --- a/src/Views/DiffView.axaml +++ b/src/Views/DiffView.axaml @@ -131,7 +131,8 @@