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

Mobile: Fixed bug where photo was not displayed just after having taken it

This commit is contained in:
Laurent Cozic 2019-06-15 21:23:30 +01:00
parent 0e7b2f36c8
commit 60ed2cbee5

View File

@ -446,13 +446,15 @@ class NoteScreenComponent extends BaseScreenComponent {
const fileStat = await shim.fsDriver().stat(targetPath);
resource.size = fileStat.size;
await Resource.save(resource, { isNew: true });
resource = await Resource.save(resource, { isNew: true });
const resourceTag = Resource.markdownTag(resource);
const newNote = Object.assign({}, this.state.note);
newNote.body += "\n" + resourceTag;
this.setState({ note: newNote });
this.refreshResource(resource);
}
async attachPhoto_onPress() {