Skip to content

Commit

Permalink
feat: add logic to handle saving collection settings on shortcut (pre…
Browse files Browse the repository at this point in the history
…view mode) (#3145)
  • Loading branch information
Pragadesh-45 authored Sep 20, 2024
1 parent dd2b93e commit e019a96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bruno-app/src/providers/Hotkeys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SaveRequest from 'components/RequestPane/SaveRequest';
import EnvironmentSettings from 'components/Environments/EnvironmentSettings';
import NetworkError from 'components/ResponsePane/NetworkError';
import NewRequest from 'components/Sidebar/NewRequest';
import { sendRequest, saveRequest } from 'providers/ReduxStore/slices/collections/actions';
import { sendRequest, saveRequest, saveCollectionRoot } from 'providers/ReduxStore/slices/collections/actions';
import { findCollectionByUid, findItemInCollection } from 'utils/collections';
import { closeTabs, switchTab } from 'providers/ReduxStore/slices/tabs';

Expand Down Expand Up @@ -54,6 +54,8 @@ export const HotkeysProvider = (props) => {
const item = findItemInCollection(collection, activeTab.uid);
if (item && item.uid) {
dispatch(saveRequest(activeTab.uid, activeTab.collectionUid));
} else if (activeTab.type === 'collection-settings') {
dispatch(saveCollectionRoot(collection.uid));
} else {
// todo: when ephermal requests go live
// setShowSaveRequestModal(true);
Expand Down

0 comments on commit e019a96

Please sign in to comment.