Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: global keyboard shortcuts

Ilian Sapundshiev8bfcc451cd17
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index c4303c42f..ef9e4259a 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -232,21 +232,17 @@ const EntryContainer = (props: Props) => {
const fileViewer = useRef<HTMLIFrameElement>(null);
const fileViewerContainer = useRef<HTMLDivElement>(null);
- useEventListener(
- 'toggle-resume',
- () => {
- // if (AppConfig.isElectron && this.fileViewer) {
- // this.fileViewer.executeJavaScript(
- // 'window.dispatchEvent(new Event("resume"));'
- // );
- // } else
- if (fileViewer && fileViewer.current.contentWindow) {
- // @ts-ignore
- fileViewer.current.contentWindow.togglePlay();
- }
- },
- fileViewer
- );
+ useEventListener('toggle-resume', () => {
+ // if (AppConfig.isElectron && this.fileViewer) {
+ // this.fileViewer.executeJavaScript(
+ // 'window.dispatchEvent(new Event("resume"));'
+ // );
+ // } else
+ if (fileViewer && fileViewer.current.contentWindow) {
+ // @ts-ignore
+ fileViewer.current.contentWindow.togglePlay();
+ }
+ });
useEventListener('message', e => {
if (typeof e.data === 'string') {
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index 0bbdda08f..e1cd771c2 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -993,7 +993,7 @@ function mapDispatchToProps(dispatch) {
toggleOnboardingDialog: AppActions.toggleOnboardingDialog,
setLastSelectedEntry: AppActions.setLastSelectedEntry,
setGeneratingThumbnails: AppActions.setGeneratingThumbnails,
- // openFile: AppActions.openFile,
+ openFile: AppActions.openFile,
openFileNatively: AppActions.openFileNatively,
openURLExternally: AppActions.openURLExternally,
setEntryFullWidth: AppActions.setEntryFullWidth,