From 56cd409d852652ce4e473c308d349866949afdc5 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Mon, 3 Jul 2023 14:41:13 +0300 Subject: [PATCH] updateBranchOrder refreshes branches list --- src/routes/repo/[projectId]/vbranches.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/routes/repo/[projectId]/vbranches.ts b/src/routes/repo/[projectId]/vbranches.ts index 844b29a0d..5bfeabefc 100644 --- a/src/routes/repo/[projectId]/vbranches.ts +++ b/src/routes/repo/[projectId]/vbranches.ts @@ -132,9 +132,13 @@ function updateBranchOrder( return invoke('update_virtual_branch', { projectId: projectId, branch: { id: branchId, order } - }).catch(() => { - error('Unable to update branch order!'); - }); + }) + .then(() => { + refresh(projectId, writable); + }) + .catch(() => { + error('Unable to update branch order!'); + }); } function applyBranch(writable: Writable>, projectId: string, branchId: string) {