Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} from '../shared/actions/ui-state';
import { setupShortcuts } from './system/shortcuts';
import { setSetting } from '../shared/actions/settings';
import { changeMode } from '../shared/actions/entries';
import { addGroup } from '../shared/actions/groups';
import { getSetting, getUIState } from '../shared/selectors';
import Root from './containers/root';
import { getQueue } from './system/queue';
// Unhandled rejections
const unhandled = require('electron-unhandled');
unhandled();
// Alter some Buttercup internals
Buttercup.Web.HashingTools.patchCorePBKDF();
Buttercup.vendor.webdav.setFetchMethod(window.fetch);
// Create store
const store = configureStore({}, 'renderer');
i18n.changeLanguage(getSetting(store.getState(), 'locale'));
linkArchiveManagerToStore(store);
setupShortcuts(store);
// Reset current archive
store.dispatch(setSetting('archivesLoading', true));
store.dispatch(setCurrentArchive(null));
store.dispatch(resetArchivesInStore([]));
ipc.on('import-history', (e, payload) => {
store.dispatch(importHistoryIntoArchive(payload));
});