enhance: refresh braches immediately after a branch has been added/deleted

This commit is contained in:
leo 2024-07-27 17:27:24 +08:00
parent 7bfb684bde
commit 0b6cab41cf
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -129,7 +129,11 @@ namespace SourceGit.ViewModels
Commands.Branch.Create(_repo.FullPath, _name, _baseOnRevision); Commands.Branch.Create(_repo.FullPath, _name, _baseOnRevision);
} }
CallUIThread(() => _repo.SetWatcherEnabled(true)); CallUIThread(() =>
{
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);
});
return true; return true;
}); });
} }

View file

@ -65,7 +65,11 @@ namespace SourceGit.ViewModels
Commands.Branch.DeleteRemote(_repo.FullPath, Target.Remote, Target.Name); Commands.Branch.DeleteRemote(_repo.FullPath, Target.Remote, Target.Name);
} }
CallUIThread(() => _repo.SetWatcherEnabled(true)); CallUIThread(() =>
{
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);
});
return true; return true;
}); });
} }