enhance: submodule bookmark inherts from parent repo (#1001)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-02-19 19:22:21 +08:00
parent 68946d2140
commit ce16ac63eb
No known key found for this signature in database

View file

@ -1161,6 +1161,10 @@ namespace SourceGit.ViewModels
public void OpenSubmodule(string submodule)
{
var selfPage = GetOwnerPage();
if (selfPage == null)
return;
var root = Path.GetFullPath(Path.Combine(_fullpath, submodule));
var normalizedPath = root.Replace("\\", "/");
@ -1171,12 +1175,12 @@ namespace SourceGit.ViewModels
{
Id = normalizedPath,
Name = Path.GetFileName(normalizedPath),
Bookmark = 0,
Bookmark = selfPage.Node.Bookmark,
IsRepository = true,
};
}
App.GetLauncer()?.OpenRepositoryInTab(node, null);
App.GetLauncer().OpenRepositoryInTab(node, null);
}
public void AddWorktree()