Mobile: Resolves #2738: Auto-save after closing a note (#2782)

* latest changes merged

* fixed linting syntax
pull/2845/head
Ishant Gupta 2020-03-24 04:04:13 +05:30 committed by GitHub
parent 7b365194ba
commit 9749a2b9b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -96,8 +96,10 @@ class NoteScreenComponent extends BaseScreenComponent {
};
this.backHandler = async () => {
const r = await saveDialog();
if (r) return r;
if (this.isModified()) {
await this.saveNoteButton_press();
}
const isProvisionalNote = this.props.provisionalNoteIds.includes(this.props.noteId);