minor sync fix for fulltext

This commit is contained in:
zadam
2019-04-11 21:44:35 +02:00
parent 896776516b
commit ae8f4ffbbe
3 changed files with 11 additions and 6 deletions

View File

@@ -107,6 +107,10 @@ class Note extends Entity {
/** @returns {Promise} */
async setContent(content) {
// force updating note itself so that dateChanged is represented correctly even for the content
this.forcedChange = true;
await this.save();
this.content = content;
const pojo = {
@@ -128,10 +132,6 @@ class Note extends Entity {
await sql.upsert("note_contents", "noteId", pojo);
await syncTableService.addNoteContentSync(this.noteId);
this.forcedChange = true;
await this.save();
}
/** @returns {Promise} */