refactor: use TreeDataGrid instead of TreeView/DataGrid to improve performance (#148)

This commit is contained in:
leo 2024-05-28 21:19:53 +08:00
parent 3160f1d142
commit b192a1c423
24 changed files with 1333 additions and 1330 deletions

View file

@ -85,6 +85,11 @@ namespace SourceGit.ViewModels
_content = previous._content;
}
if (string.IsNullOrEmpty(_option.OrgPath) || _option.OrgPath == "/dev/null")
_title = _option.Path;
else
_title = $"{_option.OrgPath} → {_option.Path}";
LoadDiffContent();
}
@ -175,11 +180,6 @@ namespace SourceGit.ViewModels
Dispatcher.UIThread.Post(() =>
{
if (string.IsNullOrEmpty(_option.OrgPath) || _option.OrgPath == "/dev/null")
Title = _option.Path;
else
Title = $"{_option.OrgPath} → {_option.Path}";
FileModeChange = latest.FileModeChange;
Content = rs;
IsTextDiff = latest.TextDiff != null;