mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
refactor: SourceGit.App
This commit is contained in:
parent
495b3a9296
commit
b06d14fec7
5 changed files with 131 additions and 107 deletions
|
@ -86,8 +86,18 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public void NavigateTo(string commitSHA)
|
||||
{
|
||||
var repo = App.FindOpenedRepository(_repo);
|
||||
repo?.NavigateToCommit(commitSHA);
|
||||
var launcher = App.GetLauncer();
|
||||
if (launcher == null)
|
||||
return;
|
||||
|
||||
foreach (var page in launcher.Pages)
|
||||
{
|
||||
if (page.Data is Repository repo && repo.FullPath.Equals(_repo))
|
||||
{
|
||||
repo.NavigateToCommit(commitSHA);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Swap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue