Skip to content

Commit c20beab

Browse files
authored
feat(#1624): Implement opening cloned request automatically (#1930)
1 parent 5539cc1 commit c20beab

File tree

1 file changed

+18
-0
lines changed
  • packages/bruno-app/src/providers/ReduxStore/slices/collections

1 file changed

+18
-0
lines changed

packages/bruno-app/src/providers/ReduxStore/slices/collections/actions.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,15 @@ export const cloneItem = (newName, itemUid, collectionUid) => (dispatch, getStat
414414
.then(() => ipcRenderer.invoke('renderer:new-request', fullName, itemToSave))
415415
.then(resolve)
416416
.catch(reject);
417+
418+
dispatch(
419+
insertTaskIntoQueue({
420+
uid: uuid(),
421+
type: 'OPEN_REQUEST',
422+
collectionUid,
423+
itemPathname: fullName
424+
})
425+
);
417426
} else {
418427
return reject(new Error('Duplicate request names are not allowed under the same folder'));
419428
}
@@ -434,6 +443,15 @@ export const cloneItem = (newName, itemUid, collectionUid) => (dispatch, getStat
434443
.then(() => ipcRenderer.invoke('renderer:new-request', fullName, itemToSave))
435444
.then(resolve)
436445
.catch(reject);
446+
447+
dispatch(
448+
insertTaskIntoQueue({
449+
uid: uuid(),
450+
type: 'OPEN_REQUEST',
451+
collectionUid,
452+
itemPathname: fullName
453+
})
454+
);
437455
} else {
438456
return reject(new Error('Duplicate request names are not allowed under the same folder'));
439457
}

0 commit comments

Comments
 (0)