revert unrelated changes

This commit is contained in:
Filip Gala 2024-09-26 19:18:15 +02:00
parent e4c28c84ac
commit 20539c7e22

View File

@ -9,10 +9,9 @@ import NewRequest from 'components/Sidebar/NewRequest';
import {
sendRequest,
saveRequest,
saveCollectionRoot,
saveFolderRoot
saveCollectionRoot
} from 'providers/ReduxStore/slices/collections/actions';
import { findCollectionByUid, findItemInCollection, isItemAFolder } from 'utils/collections';
import { findCollectionByUid, findItemInCollection } from 'utils/collections';
import { closeTabs, switchTab } from 'providers/ReduxStore/slices/tabs';
import { getKeyBindingsForActionAllOS } from './keyMappings';
@ -47,10 +46,7 @@ export const HotkeysProvider = (props) => {
const collection = findCollectionByUid(collections, activeTab.collectionUid);
if (collection) {
const item = findItemInCollection(collection, activeTab.uid);
const isFolder = isItemAFolder(item);
if (item && isFolder) {
dispatch(saveFolderRoot(collection.uid, item.uid));
} else if (item.uid) {
if (item && item.uid) {
dispatch(saveRequest(activeTab.uid, activeTab.collectionUid));
} else if (activeTab.type === 'collection-settings') {
dispatch(saveCollectionRoot(collection.uid));