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

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
This commit is contained in:
Ishant Gupta 2020-03-14 01:28:17 +05:30 committed by GitHub
parent d208da577f
commit 115eb6f511
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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