1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Removes unnecessary trivial dependencies that causes re-rendering (#6471)

This commit is contained in:
Kenichi Kobayashi 2022-06-08 02:21:55 +09:00 committed by GitHub
parent 443e049022
commit 2dedede5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 5 deletions

View File

@ -859,8 +859,6 @@ const mapStateToProps = (state: AppState) => {
return {
themeId: state.settings.theme,
settingEditorCodeView: state.settings['editor.codeView'],
folders: state.folders,
notes: state.notes,
hasDisabledSyncItems: state.hasDisabledSyncItems,
hasDisabledEncryptionItems: state.hasDisabledEncryptionItems,
showMissingMasterKeyMessage: showMissingMasterKeyMessage(syncInfo, state.notLoadedMasterKeys),

View File

@ -259,7 +259,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
return commandOutput;
},
};
}, [props.content, props.visiblePanes, addListItem, wrapSelectionWithStrings, setEditorPercentScroll, setViewerPercentScroll, resetScroll, renderedBody]);
}, [props.content, props.visiblePanes, addListItem, wrapSelectionWithStrings, setEditorPercentScroll, setViewerPercentScroll, resetScroll]);
const onEditorPaste = useCallback(async (event: any = null) => {
const resourceMds = await handlePasteEvent(event);

View File

@ -585,7 +585,6 @@ const mapStateToProps = (state: AppState) => {
return {
noteId: noteId,
notes: state.notes,
folders: state.folders,
selectedNoteIds: state.selectedNoteIds,
selectedFolderId: state.selectedFolderId,
isProvisional: state.provisionalNoteIds.includes(noteId),

View File

@ -27,7 +27,6 @@ export interface NoteEditorProps {
editorNoteStatuses: any;
syncStarted: boolean;
bodyEditor: string;
folders: any[];
notesParentType: string;
selectedNoteTags: any[];
lastEditorScrollPercents: any;