1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Mobile: Fixes #6328: Error when pressing undo or redo button while editor is closed (#6426)

This commit is contained in:
Tolulope Malomo 2022-05-10 10:23:36 +01:00 committed by GitHub
parent a8723ea512
commit 2eddd40667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1201,8 +1201,8 @@ class NoteScreenComponent extends BaseScreenComponent {
onSaveButtonPress={this.saveNoteButton_press}
showSideMenuButton={false}
showSearchButton={false}
showUndoButton={this.state.undoRedoButtonState.canUndo || this.state.undoRedoButtonState.canRedo}
showRedoButton={this.state.undoRedoButtonState.canRedo}
showUndoButton={(this.state.undoRedoButtonState.canUndo || this.state.undoRedoButtonState.canRedo) && this.state.mode === 'edit'}
showRedoButton={this.state.undoRedoButtonState.canRedo && this.state.mode === 'edit'}
undoButtonDisabled={!this.state.undoRedoButtonState.canUndo && this.state.undoRedoButtonState.canRedo}
onUndoButtonPress={this.screenHeader_undoButtonPress}
onRedoButtonPress={this.screenHeader_redoButtonPress}