mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
refactor: use MultiBinding instead of code to control visibility of Commit & Push
button
This commit is contained in:
parent
a10f9e0dd0
commit
9dd4166009
2 changed files with 10 additions and 13 deletions
|
@ -29,11 +29,7 @@ namespace SourceGit.ViewModels
|
|||
public bool CanCommitWithPush
|
||||
{
|
||||
get => _canCommitWithPush;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _canCommitWithPush, value))
|
||||
OnPropertyChanged(nameof(IsCommitWithPushVisible));
|
||||
}
|
||||
set => SetProperty(ref _canCommitWithPush, value);
|
||||
}
|
||||
|
||||
public bool HasUnsolvedConflicts
|
||||
|
@ -89,16 +85,10 @@ namespace SourceGit.ViewModels
|
|||
|
||||
Staged = GetStagedChanges();
|
||||
SelectedStaged = [];
|
||||
OnPropertyChanged(nameof(IsCommitWithPushVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCommitWithPushVisible
|
||||
{
|
||||
get => !UseAmend && CanCommitWithPush;
|
||||
}
|
||||
|
||||
public List<Models.Change> Unstaged
|
||||
{
|
||||
get => _unstaged;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue