mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: rewrite submodule to support IsDirty
state (#339)
This commit is contained in:
parent
eb441852b0
commit
1fe2be11a7
10 changed files with 110 additions and 19 deletions
|
@ -7,8 +7,9 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
public List<string> Submodules
|
||||
{
|
||||
get => _repo.Submodules;
|
||||
}
|
||||
get;
|
||||
private set;
|
||||
} = new List<string>();
|
||||
|
||||
public string SelectedSubmodule
|
||||
{
|
||||
|
@ -43,7 +44,11 @@ namespace SourceGit.ViewModels
|
|||
public UpdateSubmodules(Repository repo)
|
||||
{
|
||||
_repo = repo;
|
||||
SelectedSubmodule = repo.Submodules.Count > 0 ? repo.Submodules[0] : string.Empty;
|
||||
|
||||
foreach (var submodule in _repo.Submodules)
|
||||
Submodules.Add(submodule.Path);
|
||||
|
||||
SelectedSubmodule = Submodules.Count > 0 ? Submodules[0] : string.Empty;
|
||||
View = new Views.UpdateSubmodules() { DataContext = this };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue