Skip to content

Commit 1a4fae7

Browse files
committed
fix: always try to navigate to selected commit even if it is not changed in Blame (#2017)
Signed-off-by: leo <[email protected]>
1 parent bb395a2 commit 1a4fae7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/ViewModels/Blame.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,18 @@ public void GotoPrevRevision()
107107

108108
public void NavigateToCommit(string commitSHA, bool isBackOrForward)
109109
{
110+
if (App.GetLauncher() is { Pages: { } pages })
111+
{
112+
foreach (var page in pages)
113+
{
114+
if (page.Data is Repository repo && repo.FullPath.Equals(_repo))
115+
{
116+
repo.NavigateToCommit(commitSHA);
117+
break;
118+
}
119+
}
120+
}
121+
110122
if (Revision.SHA.StartsWith(commitSHA, StringComparison.Ordinal))
111123
return;
112124

@@ -123,18 +135,6 @@ public void NavigateToCommit(string commitSHA, bool isBackOrForward)
123135
}
124136

125137
SetBlameData(commitSHA);
126-
127-
if (App.GetLauncher() is { Pages: { } pages })
128-
{
129-
foreach (var page in pages)
130-
{
131-
if (page.Data is Repository repo && repo.FullPath.Equals(_repo))
132-
{
133-
repo.NavigateToCommit(commitSHA);
134-
break;
135-
}
136-
}
137-
}
138138
}
139139

140140
private void SetBlameData(string commitSHA)

0 commit comments

Comments
 (0)