feature: auto add checkout target branch to history filters if the filter list is not empty (#518)

This commit is contained in:
leo 2024-09-26 20:37:48 +08:00
parent 4925e56dfb
commit 05c135a89d
No known key found for this signature in database
3 changed files with 44 additions and 1 deletions

View file

@ -62,7 +62,16 @@ namespace SourceGit.ViewModels
rs = new Commands.Stash(_repo.FullPath).Pop("stash@{0}");
}
CallUIThread(() => _repo.SetWatcherEnabled(true));
CallUIThread(() =>
{
var b = _repo.Branches.Find(x => x.IsLocal && x.Name == Branch);
if (b != null)
_repo.AutoAddBranchFilterPostCheckout(b);
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);
});
return rs;
});
}