mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix refreshing option cache on sync, closes #3623
This commit is contained in:
parent
fc67dd4d0a
commit
69d7684b0d
@ -84,7 +84,7 @@ eventService.subscribeBeccaLoader([eventService.ENTITY_CHANGE_SYNCED], ({entity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (["notes", "branches", "attributes", "etapi_tokens"].includes(entityName)) {
|
if (["notes", "branches", "attributes", "etapi_tokens", "options"].includes(entityName)) {
|
||||||
const EntityClass = entityConstructor.getEntityFromEntityName(entityName);
|
const EntityClass = entityConstructor.getEntityFromEntityName(entityName);
|
||||||
const primaryKeyName = EntityClass.primaryKeyName;
|
const primaryKeyName = EntityClass.primaryKeyName;
|
||||||
|
|
||||||
|
@ -16,6 +16,11 @@ class BOption extends AbstractBeccaEntity {
|
|||||||
constructor(row) {
|
constructor(row) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
this.updateFromRow(row);
|
||||||
|
this.becca.options[this.name] = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
updateFromRow(row) {
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.name = row.name;
|
this.name = row.name;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
@ -24,8 +29,6 @@ class BOption extends AbstractBeccaEntity {
|
|||||||
this.isSynced = !!row.isSynced;
|
this.isSynced = !!row.isSynced;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.utcDateModified = row.utcDateModified;
|
this.utcDateModified = row.utcDateModified;
|
||||||
|
|
||||||
this.becca.options[this.name] = this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeSaving() {
|
beforeSaving() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user