enhance: leave the current state until we got the new diff result to reduce flickering

This commit is contained in:
leo 2024-03-20 18:27:48 +08:00
parent 2782ef4cc1
commit 340fe9e3ba
10 changed files with 158 additions and 227 deletions

View file

@ -287,7 +287,14 @@ namespace SourceGit.ViewModels
}
else
{
DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged));
if (_detailContext is DiffContext previous)
{
DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged), previous);
}
else
{
DetailContext = new DiffContext(_repo.FullPath, new Models.DiffOption(change, isUnstaged));
}
}
}