1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-23 18:53:36 +02:00

Mobile: Fixes #1746: Populate note side menu when swiping right

This commit is contained in:
Laurent Cozic 2019-07-21 14:11:30 +01:00
parent 3a9817d11e
commit b65767a43c

View File

@ -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)