TagSpaces is an offline, open source, document manager with tagging support
e2e fixes
sytolkf870609a7525
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsxindex 1786463fb..d2950b2c5 100644--- a/app/components/EntryContainer.tsx+++ b/app/components/EntryContainer.tsx@@ -50,8 +50,7 @@ import {isDesktopMode,getKeyBindingObject,isRevisionsEnabled,- getEntryContainerTab,- getFileEditHistoryKey+ getEntryContainerTab} from '-/reducers/settings';import {OpenedEntry,@@ -98,7 +97,9 @@ function EntryContainer() {const { saveDescription } = useDescriptionContext();const tabIndex = useSelector(getEntryContainerTab);const currentDirectoryPath = useSelector(getDirectoryPath);- const fileEditHistoryKey = useSelector(getFileEditHistoryKey);+ const fileEditHistoryKey = useSelector(+ (state: any) => state.settings[historyKeys.fileEditKey]+ );const readOnlyMode = useSelector(isReadOnlyMode);const keyBindings = useSelector(getKeyBindingObject);const desktopMode = useSelector(isDesktopMode);diff --git a/app/hooks/OpenedEntryContextProvider.tsx b/app/hooks/OpenedEntryContextProvider.tsxindex 2a16de176..5258c6639 100644--- a/app/hooks/OpenedEntryContextProvider.tsx+++ b/app/hooks/OpenedEntryContextProvider.tsx@@ -50,8 +50,6 @@ import {} from '-/services/utils-io';import {actions as SettingsActions,- getFileOpenHistoryKey,- getFolderOpenHistoryKey,getNewHTMLFileContent,getSupportedFileTypes} from '-/reducers/settings';@@ -148,8 +146,13 @@ export const OpenedEntryContextProvider = ({const locations: TS.Location[] = useSelector(getLocations);const currentLocation: TS.Location = useSelector(getCurrentLocation);const currentDirectoryPath = useSelector(getDirectoryPath);- const fileOpenHistory = useSelector(getFileOpenHistoryKey);- const folderOpenHistory = useSelector(getFolderOpenHistoryKey);+ const historyKeys = Pro && Pro.history ? Pro.history.historyKeys : {};+ const fileOpenHistory = useSelector(+ (state: any) => state.settings[historyKeys.fileOpenKey]+ );+ const folderOpenHistory = useSelector(+ (state: any) => state.settings[historyKeys.folderOpenKey]+ );const newHTMLFileContent = useSelector(getNewHTMLFileContent);const initOpenLink = useSelector(getOpenLink);const editedEntryPaths = useSelector(getEditedEntryPaths);@@ -984,7 +987,9 @@ export const OpenedEntryContextProvider = ({openedEntries,isEntryInFullWidth,currentLocation,- currentDirectoryPath+ currentDirectoryPath,+ fileOpenHistory,+ folderOpenHistory]);return (diff --git a/app/reducers/settings.ts b/app/reducers/settings.tsindex 293e1d304..e234033f1 100644--- a/app/reducers/settings.ts+++ b/app/reducers/settings.ts@@ -33,8 +33,6 @@ import {updateByProp} from '-/services/utils-io';-const historyKeys = Pro && Pro.history ? Pro.history.historyKeys : {};-export const types = {UPGRADE_SETTINGS: 'SETTINGS/UPGRADE_SETTINGS',SET_LANGUAGE: 'SETTINGS/SET_LANGUAGE',@@ -806,6 +804,9 @@ export const actions = {}};+/**+ * TODO move out of reducer+ */export function getLastVersionPromise(): Promise<string> {return new Promise((resolve, reject) => {console.log('Checking for new version...');@@ -926,12 +927,6 @@ export const getDefaultDarkTheme = (state: any) =>state.settings.currentDarkTheme;export const isGlobalKeyBindingEnabled = (state: any) =>state.settings.enableGlobalKeyboardShortcuts;-export const getFileOpenHistoryKey = (state: any) =>- state.settings[historyKeys.fileOpenKey];-export const getFolderOpenHistoryKey = (state: any) =>- state.settings[historyKeys.folderOpenKey];-export const getFileEditHistoryKey = (state: any) =>- state.settings[historyKeys.fileEditKey];export const getMainVerticalSplitSize = (state: any) =>state.settings.mainVSplitSize;export const getNewHTMLFileContent = (state: any) =>