Skip to content

Commit 0b6cab4

Browse files
committed
enhance: refresh braches immediately after a branch has been added/deleted
1 parent 7bfb684 commit 0b6cab4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/ViewModels/CreateBranch.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ public override Task<bool> Sure()
129129
Commands.Branch.Create(_repo.FullPath, _name, _baseOnRevision);
130130
}
131131

132-
CallUIThread(() => _repo.SetWatcherEnabled(true));
132+
CallUIThread(() =>
133+
{
134+
_repo.MarkBranchesDirtyManually();
135+
_repo.SetWatcherEnabled(true);
136+
});
133137
return true;
134138
});
135139
}

src/ViewModels/DeleteBranch.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ public override Task<bool> Sure()
6565
Commands.Branch.DeleteRemote(_repo.FullPath, Target.Remote, Target.Name);
6666
}
6767

68-
CallUIThread(() => _repo.SetWatcherEnabled(true));
68+
CallUIThread(() =>
69+
{
70+
_repo.MarkBranchesDirtyManually();
71+
_repo.SetWatcherEnabled(true);
72+
});
6973
return true;
7074
});
7175
}

0 commit comments

Comments
 (0)