diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 83cff278..f330c70f 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -46,13 +46,25 @@ namespace SourceGit.ViewModels public List Unstaged { get => _unstaged; - private set => SetProperty(ref _unstaged, value); + private set + { + if (SetProperty(ref _unstaged, value)) + { + OnPropertyChanged(nameof(UnstagedCount)); + } + } } public List Staged { get => _staged; - private set => SetProperty(ref _staged, value); + private set + { + if (SetProperty(ref _staged, value)) + { + OnPropertyChanged(nameof(StagedCount)); + } + } } public int Count @@ -60,6 +72,16 @@ namespace SourceGit.ViewModels get => _count; } + public int UnstagedCount + { + get => _unstaged.Count; + } + + public int StagedCount + { + get => _staged.Count; + } + public Models.Change SelectedUnstagedChange { get => _selectedUnstagedChange; diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index dba6bc08..11031c07 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -22,7 +22,15 @@ - + + + + + +