fix: when base is current worktree, the diff content of selected change is wrong

* remove warnings in JetBrains Rider (it seems JetBrains can NOT recognize Binding.TargetNullValue)
This commit is contained in:
leo 2024-07-27 21:35:57 +08:00
parent 4612cecf10
commit 20b45a1cf4
No known key found for this signature in database
7 changed files with 31 additions and 42 deletions

View file

@ -15,7 +15,7 @@ namespace SourceGit.ViewModels
{
_repo = repo;
Mode = null;
Mode = new Models.Null();
View = new Views.Discard { DataContext = this };
}
@ -26,7 +26,7 @@ namespace SourceGit.ViewModels
_isUnstaged = isUnstaged;
if (_changes == null)
Mode = null;
Mode = new Models.Null();
else if (_changes.Count == 1)
Mode = _changes[0].Path;
else