1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Mobile: Plugin API: Implement the toggleVisiblePanes command (#11496)

This commit is contained in:
Henry Heino
2024-12-13 04:55:37 -08:00
committed by GitHub
parent 154b78f7ce
commit 81f3a02dba
7 changed files with 57 additions and 5 deletions

View File

@ -60,7 +60,7 @@ import getImageDimensions from '../../../utils/image/getImageDimensions';
import resizeImage from '../../../utils/image/resizeImage';
import { CameraResult } from '../../CameraView/types';
import { DialogContext, DialogControl } from '../../DialogManager';
import { CommandRuntimeProps, PickerResponse } from './types';
import { CommandRuntimeProps, EditorMode, PickerResponse } from './types';
import commands from './commands';
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
@ -91,7 +91,7 @@ interface ComponentProps extends Props {
interface State {
note: NoteEntity;
mode: 'view'|'edit';
mode: EditorMode;
readOnly: boolean;
folder: FolderEntity|null;
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
@ -340,6 +340,10 @@ class NoteScreenComponent extends BaseScreenComponent<ComponentProps, State> imp
this.setState({ noteTagDialogShown: visible });
},
getMode: () => this.state.mode,
setMode: (mode: 'view'|'edit') => {
this.setState({ mode });
},
},
commands,
true,