From 115eb6f511f22ba0951fde690b3ce476fde1061a Mon Sep 17 00:00:00 2001 From: Ishant Gupta Date: Sat, 14 Mar 2020 01:28:17 +0530 Subject: [PATCH] Mobile: Resolves #2715: Close sidebar when displaying error dialog (#2720) * added a new close function to close sidebar for an error and fixed #2715 * changed function to inline call of dispatch fixes #2715 --- ReactNativeClient/lib/components/screens/note.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 39cbd94107..56b03fac49 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -184,6 +184,7 @@ class NoteScreenComponent extends BaseScreenComponent { this.cameraView_onPhoto = this.cameraView_onPhoto.bind(this); this.cameraView_onCancel = this.cameraView_onCancel.bind(this); this.properties_onPress = this.properties_onPress.bind(this); + this.showOnMap_onPress = this.showOnMap_onPress.bind(this); this.onMarkForDownload = this.onMarkForDownload.bind(this); this.sideMenuOptions = this.sideMenuOptions.bind(this); this.folderPickerOptions_valueChanged = this.folderPickerOptions_valueChanged.bind(this); @@ -599,6 +600,7 @@ class NoteScreenComponent extends BaseScreenComponent { const url = Note.geolocationUrl(note); Linking.openURL(url); } catch (error) { + this.props.dispatch({ type: 'SIDE_MENU_CLOSE' }); await dialogs.error(this, error.message); } }