feature: use numeric sorting for all trees (#597)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-10-24 15:11:10 +08:00
parent 12bb915bd8
commit 76a7a2228f
No known key found for this signature in database
4 changed files with 78 additions and 6 deletions

View file

@ -194,9 +194,9 @@ namespace SourceGit.ViewModels
return -1;
if (l.Backend is Models.Branch)
return r.Backend is Models.Branch ? string.Compare(l.Name, r.Name, StringComparison.Ordinal) : 1;
return r.Backend is Models.Branch ? Models.NumericSort.Compare(l.Name, r.Name) : 1;
return r.Backend is Models.Branch ? -1 : string.Compare(l.Name, r.Name, StringComparison.Ordinal);
return r.Backend is Models.Branch ? -1 : Models.NumericSort.Compare(l.Name, r.Name);
});
foreach (var node in nodes)