mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: code cleanup
This commit is contained in:
parent
04f4293421
commit
fa3a3b2dad
25 changed files with 174 additions and 233 deletions
|
@ -158,13 +158,6 @@ namespace SourceGit.ViewModels
|
|||
get => _stashesPage == null ? 0 : _stashesPage.Count;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public bool CanCommitWithPush
|
||||
{
|
||||
get => _canCommitWithPush;
|
||||
private set => SetProperty(ref _canCommitWithPush, value);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IncludeUntracked
|
||||
{
|
||||
|
@ -172,9 +165,7 @@ namespace SourceGit.ViewModels
|
|||
set
|
||||
{
|
||||
if (SetProperty(ref _includeUntracked, value))
|
||||
{
|
||||
Task.Run(RefreshWorkingCopyChanges);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,8 +558,11 @@ namespace SourceGit.ViewModels
|
|||
LocalBranchTrees = builder.Locals;
|
||||
RemoteBranchTrees = builder.Remotes;
|
||||
|
||||
var cur = Branches.Find(x => x.IsCurrent);
|
||||
CanCommitWithPush = cur != null && !string.IsNullOrEmpty(cur.Upstream);
|
||||
if (_workingCopy != null)
|
||||
{
|
||||
var cur = Branches.Find(x => x.IsCurrent);
|
||||
_workingCopy.CanCommitWithPush = cur != null && !string.IsNullOrEmpty(cur.Upstream);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1520,7 +1514,6 @@ namespace SourceGit.ViewModels
|
|||
private List<BranchTreeNode> _remoteBranchTrees = new List<BranchTreeNode>();
|
||||
private List<Models.Tag> _tags = new List<Models.Tag>();
|
||||
private List<string> _submodules = new List<string>();
|
||||
private bool _canCommitWithPush = false;
|
||||
private bool _includeUntracked = true;
|
||||
|
||||
private InProgressContext _inProgressContext = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue