enhance: better sync scroll logic with two-side diff - if the width in each side is different

This commit is contained in:
leo 2024-03-12 15:50:00 +08:00
parent b8a230cf16
commit a37c11e32f
3 changed files with 36 additions and 12 deletions

View file

@ -145,7 +145,7 @@ namespace SourceGit.Models {
name.StartsWith("worktrees/")) {
_updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime();
} else if (name.StartsWith("objects/", StringComparison.Ordinal) || name.Equals("index", StringComparison.Ordinal)) {
_updateWC = DateTime.Now.AddSeconds(.5).ToFileTime();
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
}
}
@ -154,7 +154,7 @@ namespace SourceGit.Models {
var name = e.Name.Replace("\\", "/");
if (name == ".git" || name.StartsWith(".git/", StringComparison.Ordinal)) return;
if (_updateWC == 0) _updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
}
private IRepository _repo = null;