diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 65de49b52..1aadd1c8c 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -288,11 +288,18 @@ class NoteScreenComponent extends BaseScreenComponent { ResourceFetcher.instance().markForDownload(event.resourceId); } - componentDidUpdate() { + componentDidUpdate(prevProps) { if (this.doFocusUpdate_) { this.doFocusUpdate_ = false; this.focusUpdate(); } + + if (prevProps.showSideMenu !== this.props.showSideMenu && this.props.showSideMenu) { + this.props.dispatch({ + type: 'NOTE_SIDE_MENU_OPTIONS_SET', + options: this.sideMenuOptions(), + }); + } } componentWillUnmount() { @@ -554,11 +561,6 @@ class NoteScreenComponent extends BaseScreenComponent { } properties_onPress() { - this.props.dispatch({ - type: 'NOTE_SIDE_MENU_OPTIONS_SET', - options: this.sideMenuOptions(), - }); - this.props.dispatch({ type: 'SIDE_MENU_OPEN' }); } @@ -891,6 +893,7 @@ const NoteScreen = connect( theme: state.settings.theme, ftsEnabled: state.settings['db.ftsEnabled'], sharedData: state.sharedData, + showSideMenu: state.showSideMenu, }; } )(NoteScreenComponent)