From e7fd44f259d5a884e80d222a5b3a8b57b5e6e0d3 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Tue, 29 Oct 2024 17:00:40 +0100 Subject: [PATCH] Emit virtual branches after fetch This is because, in case a branch was integrated, the state is updated --- crates/gitbutler-tauri/src/virtual_branches.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gitbutler-tauri/src/virtual_branches.rs b/crates/gitbutler-tauri/src/virtual_branches.rs index 9ad880915..60a409761 100644 --- a/crates/gitbutler-tauri/src/virtual_branches.rs +++ b/crates/gitbutler-tauri/src/virtual_branches.rs @@ -492,8 +492,9 @@ pub mod commands { } #[tauri::command(async)] - #[instrument(skip(projects), err(Debug))] + #[instrument(skip(projects, windows), err(Debug))] pub fn fetch_from_remotes( + windows: State<'_, WindowState>, projects: State<'_, projects::Controller>, project_id: ProjectId, action: Option, @@ -520,6 +521,7 @@ pub mod commands { return Err(anyhow!(error).into()); } + emit_vbranches(&windows, project_id); let base_branch = gitbutler_branch_actions::get_base_branch_data(&project)?; Ok(base_branch) }