fix: try to fix issue #338

* upgrade Avalonia to `11.1.3`
* use reactive property instead of simple getter
This commit is contained in:
leo 2024-08-13 17:38:58 +08:00
parent 34a598d421
commit f3406e93fc
No known key found for this signature in database
5 changed files with 30 additions and 23 deletions

View file

@ -243,7 +243,7 @@ namespace SourceGit.ViewModels
reword.Icon = App.CreateMenuIcon("Icons.Edit");
reword.Click += (_, e) =>
{
if (_repo.WorkingCopyChangesCount > 0)
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
@ -261,7 +261,7 @@ namespace SourceGit.ViewModels
squash.IsEnabled = commit.Parents.Count == 1;
squash.Click += (_, e) =>
{
if (_repo.WorkingCopyChangesCount > 0)
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
@ -322,7 +322,7 @@ namespace SourceGit.ViewModels
interactiveRebase.IsVisible = current.Head != commit.SHA;
interactiveRebase.Click += (_, e) =>
{
if (_repo.WorkingCopyChangesCount > 0)
if (_repo.LocalChangesCount > 0)
{
App.RaiseException(_repo.FullPath, "You have local changes. Please run stash or discard first.");
return;
@ -379,7 +379,7 @@ namespace SourceGit.ViewModels
};
menu.Items.Add(compareWithHead);
if (_repo.WorkingCopyChangesCount > 0)
if (_repo.LocalChangesCount > 0)
{
var compareWithWorktree = new MenuItem();
compareWithWorktree.Header = App.Text("CommitCM.CompareWithWorktree");