diff --git a/src/app.rs b/src/app.rs index 0daa984a..9ce52a65 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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(()) } diff --git a/src/components/create_branch.rs b/src/components/create_branch.rs index d74b1ec7..f3c77ebb 100644 --- a/src/components/create_branch.rs +++ b/src/components/create_branch.rs @@ -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) => { diff --git a/src/queue.rs b/src/queue.rs index a5226e51..6db977b1 100644 --- a/src/queue.rs +++ b/src/queue.rs @@ -12,6 +12,8 @@ bitflags! { const DIFF = 0b010; /// commands might need updating (app::update_commands) const COMMANDS = 0b100; + /// branches have changed + const BRANCHES = 0b1000; } }