diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index c91f5e73..c7f2e86f 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -937,6 +937,9 @@ namespace SourceGit.ViewModels CurrentBranch = branches.Find(x => x.IsCurrent); LocalBranchTrees = builder.Locals; RemoteBranchTrees = builder.Remotes; + + if (_workingCopy != null) + _workingCopy.HasRemotes = remotes.Count > 0; }); } diff --git a/src/ViewModels/WorkingCopy.cs b/src/ViewModels/WorkingCopy.cs index 255d6b6b..08f8690a 100644 --- a/src/ViewModels/WorkingCopy.cs +++ b/src/ViewModels/WorkingCopy.cs @@ -26,6 +26,12 @@ namespace SourceGit.ViewModels } } + public bool HasRemotes + { + get => _hasRemotes; + set => SetProperty(ref _hasRemotes, value); + } + public bool HasUnsolvedConflicts { get => _hasUnsolvedConflicts; @@ -1619,6 +1625,7 @@ namespace SourceGit.ViewModels private bool _isUnstaging = false; private bool _isCommitting = false; private bool _useAmend = false; + private bool _hasRemotes = false; private List _cached = []; private List _unstaged = []; private List _staged = []; diff --git a/src/Views/WorkingCopy.axaml b/src/Views/WorkingCopy.axaml index e0d0503d..c22fb32d 100644 --- a/src/Views/WorkingCopy.axaml +++ b/src/Views/WorkingCopy.axaml @@ -374,6 +374,7 @@ ToolTip.VerticalOffset="0"> +