From 0b6cab41cfb90e072412d3dbd7a5afc417c67ae7 Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 27 Jul 2024 17:27:24 +0800 Subject: [PATCH] enhance: refresh braches immediately after a branch has been added/deleted --- src/ViewModels/CreateBranch.cs | 6 +++++- src/ViewModels/DeleteBranch.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ViewModels/CreateBranch.cs b/src/ViewModels/CreateBranch.cs index bc42ee9e..1b472d58 100644 --- a/src/ViewModels/CreateBranch.cs +++ b/src/ViewModels/CreateBranch.cs @@ -129,7 +129,11 @@ namespace SourceGit.ViewModels Commands.Branch.Create(_repo.FullPath, _name, _baseOnRevision); } - CallUIThread(() => _repo.SetWatcherEnabled(true)); + CallUIThread(() => + { + _repo.MarkBranchesDirtyManually(); + _repo.SetWatcherEnabled(true); + }); return true; }); } diff --git a/src/ViewModels/DeleteBranch.cs b/src/ViewModels/DeleteBranch.cs index aafede8d..ba1aa839 100644 --- a/src/ViewModels/DeleteBranch.cs +++ b/src/ViewModels/DeleteBranch.cs @@ -65,7 +65,11 @@ namespace SourceGit.ViewModels Commands.Branch.DeleteRemote(_repo.FullPath, Target.Remote, Target.Name); } - CallUIThread(() => _repo.SetWatcherEnabled(true)); + CallUIThread(() => + { + _repo.MarkBranchesDirtyManually(); + _repo.SetWatcherEnabled(true); + }); return true; }); }