mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: use TreeDataGrid instead of TreeView/DataGrid to improve performance (#148)
This commit is contained in:
parent
3160f1d142
commit
b192a1c423
24 changed files with 1333 additions and 1330 deletions
|
@ -18,11 +18,10 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _isExpanded, value);
|
||||
}
|
||||
|
||||
public static List<FileTreeNode> Build(List<Models.Change> changes)
|
||||
public static List<FileTreeNode> Build(List<Models.Change> changes, bool expanded)
|
||||
{
|
||||
var nodes = new List<FileTreeNode>();
|
||||
var folders = new Dictionary<string, FileTreeNode>();
|
||||
var expanded = changes.Count <= 50;
|
||||
|
||||
foreach (var c in changes)
|
||||
{
|
||||
|
@ -94,11 +93,10 @@ namespace SourceGit.ViewModels
|
|||
return nodes;
|
||||
}
|
||||
|
||||
public static List<FileTreeNode> Build(List<Models.Object> files)
|
||||
public static List<FileTreeNode> Build(List<Models.Object> files, bool expanded)
|
||||
{
|
||||
var nodes = new List<FileTreeNode>();
|
||||
var folders = new Dictionary<string, FileTreeNode>();
|
||||
var expanded = files.Count <= 50;
|
||||
|
||||
foreach (var f in files)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue