mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
frontend sync fixes
This commit is contained in:
parent
826c434630
commit
99ea238c3f
@ -201,7 +201,7 @@ subscribeToMessages(message => {
|
||||
});
|
||||
|
||||
async function processSyncRows(syncRows) {
|
||||
const loadResults = new LoadResults(this);
|
||||
const loadResults = new LoadResults(treeCache);
|
||||
|
||||
syncRows.filter(sync => sync.entityName === 'notes').forEach(sync => {
|
||||
const note = treeCache.notes[sync.entityId];
|
||||
@ -244,7 +244,7 @@ async function processSyncRows(syncRows) {
|
||||
}
|
||||
else if (!sync.entity.isDeleted) {
|
||||
if (childNote || parentNote) {
|
||||
branch = new Branch(this, sync.entity);
|
||||
branch = new Branch(treeCache, sync.entity);
|
||||
treeCache.branches[branch.branchId] = branch;
|
||||
|
||||
loadResults.addBranch(sync.entityId, sync.sourceId);
|
||||
@ -294,7 +294,7 @@ async function processSyncRows(syncRows) {
|
||||
}
|
||||
else if (!sync.entity.isDeleted) {
|
||||
if (sourceNote || targetNote) {
|
||||
attribute = new Attribute(this, sync.entity);
|
||||
attribute = new Attribute(treeCache, sync.entity);
|
||||
|
||||
treeCache.attributes[attribute.attributeId] = attribute;
|
||||
|
||||
|
@ -404,7 +404,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
await this.tree.reload(notes);
|
||||
}
|
||||
|
||||
createTopLevelNoteListener() { treeService.createNewTopLevelNote(); }
|
||||
createTopLevelNoteListener() { noteCreateService.createNewTopLevelNote(); }
|
||||
|
||||
collapseTreeListener() { this.collapseTree(); }
|
||||
|
||||
|
@ -45,7 +45,7 @@ export default class TabCachingWidget extends TabAwareWidget {
|
||||
widget.eventReceived('setTabContext', {tabContext: this.tabContext});
|
||||
}
|
||||
|
||||
widget.toggle(true);
|
||||
widget.toggle(widget.isEnabled());
|
||||
}
|
||||
|
||||
tabRemovedListener({tabId}) {
|
||||
@ -63,7 +63,7 @@ export default class TabCachingWidget extends TabAwareWidget {
|
||||
for (const tabId in this.widgets) {
|
||||
this.widgets[tabId].toggle(
|
||||
show
|
||||
&& this.tabContext && tabId === this.tabContext.tabId
|
||||
&& this.isTab(tabId)
|
||||
&& this.widgets[tabId].isEnabled());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user