update branchlist after creating a branch (#702)

This commit is contained in:
Stephan Dilly 2021-05-12 11:37:08 +02:00 committed by GitHub
parent f35ce0cbf4
commit 3643cea44d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -475,6 +475,9 @@ impl App {
if flags.contains(NeedsUpdate::COMMANDS) {
self.update_commands();
}
if flags.contains(NeedsUpdate::BRANCHES) {
self.select_branch_popup.update_branches()?;
}
Ok(())
}

View file

@ -123,7 +123,7 @@ impl CreateBranchComponent {
match res {
Ok(_) => {
self.queue.borrow_mut().push_back(
InternalEvent::Update(NeedsUpdate::ALL),
InternalEvent::Update(NeedsUpdate::BRANCHES),
);
}
Err(e) => {

View file

@ -12,6 +12,8 @@ bitflags! {
const DIFF = 0b010;
/// commands might need updating (app::update_commands)
const COMMANDS = 0b100;
/// branches have changed
const BRANCHES = 0b1000;
}
}