Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
rename loadresults methods/properties for clarity that they don't contain entities, only rows
zadame6bf6424e856
diff --git a/db/migrations/0221__rename_note_revision_to_revision.sql b/db/migrations/0221__rename_note_revision_to_revision.sqlindex 59409d8401..7800998728 100644--- a/db/migrations/0221__rename_note_revision_to_revision.sql+++ b/db/migrations/0221__rename_note_revision_to_revision.sql@@ -22,4 +22,4 @@ CREATE INDEX `IDX_revisions_utcDateLastEdited` ON `revisions` (`utcDateLastEditeCREATE INDEX `IDX_revisions_dateCreated` ON `revisions` (`dateCreated`);CREATE INDEX `IDX_revisions_dateLastEdited` ON `revisions` (`dateLastEdited`);-UPDATE entity_changes SET entity_name = 'revisions' WHERE entity_name = 'note_revisions';+UPDATE entity_changes SET entityName = 'revisions' WHERE entityName = 'note_revisions';diff --git a/package-lock.json b/package-lock.jsonindex 56d259cbcd..f93d248124 100644--- a/package-lock.json+++ b/package-lock.json@@ -5,7 +5,6 @@"requires": true,"packages": {"": {- "name": "trilium","version": "0.60.1-beta","hasInstallScript": true,"license": "AGPL-3.0-only",diff --git a/src/public/app/components/note_context.js b/src/public/app/components/note_context.jsindex 9e0716cb34..de39313e42 100644--- a/src/public/app/components/note_context.js+++ b/src/public/app/components/note_context.js@@ -241,7 +241,7 @@ class NoteContext extends Component {async entitiesReloadedEvent({loadResults}) {if (loadResults.isNoteReloaded(this.noteId)) {- const note = loadResults.getEntity('notes', this.noteId);+ const note = loadResults.getEntityRow('notes', this.noteId);if (note.isDeleted) {this.noteId = null;diff --git a/src/public/app/components/shortcut_component.js b/src/public/app/components/shortcut_component.jsindex 9df62d7bb0..dfe0dde368 100644--- a/src/public/app/components/shortcut_component.js+++ b/src/public/app/components/shortcut_component.js@@ -27,7 +27,7 @@ export default class ShortcutComponent extends Component {}async entitiesReloadedEvent({loadResults}) {- for (const attr of loadResults.getAttributes()) {+ for (const attr of loadResults.getAttributeRows()) {if (attr.type === 'label' && attr.name === 'keyboardShortcut') {const note = await froca.getNote(attr.noteId);// launcher shortcuts are handled specificallydiff --git a/src/public/app/services/froca_updater.js b/src/public/app/services/froca_updater.jsindex 27afe7cb10..74051aff5c 100644--- a/src/public/app/services/froca_updater.js+++ b/src/public/app/services/froca_updater.js@@ -262,7 +262,7 @@ function processAttachment(loadResults, ec) {note.attachments = note.attachments.filter(att => att.attachmentId !== attachment.attachmentId);}- loadResults.addAttachment(ec.entity);+ loadResults.addAttachmentRow(ec.entity);delete froca.attachments[ec.entityId];}@@ -280,7 +280,7 @@ function processAttachment(loadResults, ec) {}}- loadResults.addAttachment(ec.entity);+ loadResults.addAttachmentRow(ec.entity);}export default {diff --git a/src/public/app/services/load_results.js b/src/public/app/services/load_results.jsindex 59c0a9ebe6..af36f7d8ef 100644--- a/src/public/app/services/load_results.js+++ b/src/public/app/services/load_results.js@@ -12,22 +12,22 @@ export default class LoadResults {this.noteIdToComponentId = {};this.componentIdToNoteIds = {};- this.branches = [];+ this.branchRows = [];- this.attributes = [];+ this.attributeRows = [];this.noteReorderings = [];- this.revisions = [];+ this.revisionRows = [];this.contentNoteIdToComponentId = [];- this.options = [];+ this.optionNames = [];- this.attachments = [];+ this.attachmentRows = [];}- getEntity(entityName, entityId) {+ getEntityRow(entityName, entityId) {return this.entities[entityName]?.[entityId];}@@ -46,12 +46,12 @@ export default class LoadResults {}addBranch(branchId, componentId) {- this.branches.push({branchId, componentId});+ this.branchRows.push({branchId, componentId});}- getBranches() {- return this.branches- .map(row => this.getEntity("branches", row.branchId))+ getBranchRows() {+ return this.branchRows+ .map(row => this.getEntityRow("branches", row.branchId)).filter(branch => !!branch);}@@ -64,23 +64,23 @@ export default class LoadResults {}addAttribute(attributeId, componentId) {- this.attributes.push({attributeId, componentId});+ this.attributeRows.push({attributeId, componentId});}/** @returns {FAttribute[]} */- getAttributes(componentId = 'none') {- return this.attributes+ getAttributeRows(componentId = 'none') {+ return this.attributeRows.filter(row => row.componentId !== componentId)- .map(row => this.getEntity("attributes", row.attributeId))+ .map(row => this.getEntityRow("attributes", row.attributeId)).filter(attr => !!attr);}addRevision(revisionId, noteId, componentId) {- this.revisions.push({revisionId, noteId, componentId});+ this.revisionRows.push({revisionId, noteId, componentId});}hasRevisionForNote(noteId) {- return !!this.revisions.find(nr => nr.noteId === noteId);+ return !!this.revisionRows.find(row => row.noteId === noteId);}getNoteIds() {@@ -111,19 +111,19 @@ export default class LoadResults {}addOption(name) {- this.options.push(name);+ this.optionNames.push(name);}isOptionReloaded(name) {- return this.options.includes(name);+ return this.optionNames.includes(name);}- addAttachment(attachment) {- this.attachments.push(attachment);+ addAttachmentRow(attachment) {+ this.attachmentRows.push(attachment);}- getAttachments() {- return this.attachments;+ getAttachmentRows() {+ return this.attachmentRows;}/**@@ -131,25 +131,25 @@ export default class LoadResults {* notably changes in note itself should not have any effect on attributes*/hasAttributeRelatedChanges() {- return this.branches.length > 0- || this.attributes.length > 0;+ return this.branchRows.length > 0+ || this.attributeRows.length > 0;}isEmpty() {return Object.keys(this.noteIdToComponentId).length === 0- && this.branches.length === 0- && this.attributes.length === 0+ && this.branchRows.length === 0+ && this.attributeRows.length === 0&& this.noteReorderings.length === 0- && this.revisions.length === 0+ && this.revisionRows.length === 0&& this.contentNoteIdToComponentId.length === 0- && this.options.length === 0- && this.attachments.length === 0;+ && this.optionNames.length === 0+ && this.attachmentRows.length === 0;}isEmptyForTree() {return Object.keys(this.noteIdToComponentId).length === 0- && this.branches.length === 0- && this.attributes.length === 0+ && this.branchRows.length === 0+ && this.attributeRows.length === 0&& this.noteReorderings.length === 0;}}diff --git a/src/public/app/widgets/attachment_detail.js b/src/public/app/widgets/attachment_detail.jsindex b85bea9e35..8b8c60d28a 100644--- a/src/public/app/widgets/attachment_detail.js+++ b/src/public/app/widgets/attachment_detail.js@@ -1,7 +1,6 @@import utils from "../services/utils.js";import AttachmentActionsWidget from "./buttons/attachments_actions.js";import BasicWidget from "./basic_widget.js";-import server from "../services/server.js";import options from "../services/options.js";import imageService from "../services/image.js";import linkService from "../services/link.js";@@ -192,7 +191,7 @@ export default class AttachmentDetailWidget extends BasicWidget {}async entitiesReloadedEvent({loadResults}) {- const attachmentChange = loadResults.getAttachments().find(att => att.attachmentId === this.attachment.attachmentId);+ const attachmentChange = loadResults.getAttachmentRows().find(att => att.attachmentId === this.attachment.attachmentId);if (attachmentChange) {if (attachmentChange.isDeleted) {diff --git a/src/public/app/widgets/attribute_widgets/attribute_editor.js b/src/public/app/widgets/attribute_widgets/attribute_editor.jsindex beba04d89c..cef05b895c 100644--- a/src/public/app/widgets/attribute_widgets/attribute_editor.js+++ b/src/public/app/widgets/attribute_widgets/attribute_editor.js@@ -520,7 +520,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {+ if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {this.refresh();}}diff --git a/src/public/app/widgets/bookmark_buttons.js b/src/public/app/widgets/bookmark_buttons.jsindex 77a9ec8936..1bc5345273 100644--- a/src/public/app/widgets/bookmark_buttons.js+++ b/src/public/app/widgets/bookmark_buttons.js@@ -38,11 +38,11 @@ export default class BookmarkButtons extends FlexContainer {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getBranches().find(branch => branch.parentNoteId === '_lbBookmarks')) {+ if (loadResults.getBranchRows().find(branch => branch.parentNoteId === '_lbBookmarks')) {this.refresh();}- if (loadResults.getAttributes().find(attr => attr.type === 'label'+ if (loadResults.getAttributeRows().find(attr => attr.type === 'label'&& ['iconClass', 'workspaceIconClass', 'bookmarkFolder'].includes(attr.name)&& this.noteIds.includes(attr.noteId))) {diff --git a/src/public/app/widgets/bookmark_switch.js b/src/public/app/widgets/bookmark_switch.jsindex b33a752b93..22040e3e85 100644--- a/src/public/app/widgets/bookmark_switch.js+++ b/src/public/app/widgets/bookmark_switch.js@@ -35,7 +35,7 @@ export default class BookmarkSwitchWidget extends SwitchWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getBranches().find(b => b.noteId === this.noteId)) {+ if (loadResults.getBranchRows().find(b => b.noteId === this.noteId)) {this.refresh();}}diff --git a/src/public/app/widgets/buttons/button_from_note.js b/src/public/app/widgets/buttons/button_from_note.jsindex d8d08791e2..31d93195ad 100644--- a/src/public/app/widgets/buttons/button_from_note.js+++ b/src/public/app/widgets/buttons/button_from_note.js@@ -42,7 +42,7 @@ export default class ButtonFromNoteWidget extends CommandButtonWidget {return;}- if (loadResults.getAttributes(this.componentId).find(attr =>+ if (loadResults.getAttributeRows(this.componentId).find(attr =>attr.type === 'label'&& attr.name === 'iconClass'&& attributeService.isAffecting(attr, buttonNote))) {diff --git a/src/public/app/widgets/buttons/edit_button.js b/src/public/app/widgets/buttons/edit_button.jsindex a161f7540f..daf29c0975 100644--- a/src/public/app/widgets/buttons/edit_button.js+++ b/src/public/app/widgets/buttons/edit_button.js@@ -53,7 +53,7 @@ export default class EditButton extends OnClickButtonWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(+ if (loadResults.getAttributeRows().find(attr => attr.type === 'label'&& attr.name.toLowerCase().includes("readonly")&& attributeService.isAffecting(attr, this.note)diff --git a/src/public/app/widgets/buttons/launcher/abstract_launcher.js b/src/public/app/widgets/buttons/launcher/abstract_launcher.jsindex 02948e3381..87bfbd6d01 100644--- a/src/public/app/widgets/buttons/launcher/abstract_launcher.js+++ b/src/public/app/widgets/buttons/launcher/abstract_launcher.js@@ -31,7 +31,7 @@ export default class AbstractLauncher extends OnClickButtonWidget {}entitiesReloadedEvent({loadResults}) {- for (const attr of loadResults.getAttributes()) {+ for (const attr of loadResults.getAttributeRows()) {if (attr.noteId === this.launcherNote.noteId && attr.type === 'label' && attr.name === 'keyboardShortcut') {this.bindNoteShortcutHandler(attr);} else if (attr.type === 'label' && attr.name === 'iconClass' && attributesService.isAffecting(attr, this.launcherNote)) {diff --git a/src/public/app/widgets/containers/launcher_container.js b/src/public/app/widgets/containers/launcher_container.jsindex 1c18590487..a278dfe9c6 100644--- a/src/public/app/widgets/containers/launcher_container.js+++ b/src/public/app/widgets/containers/launcher_container.js@@ -66,7 +66,7 @@ export default class LauncherContainer extends FlexContainer {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getBranches().find(branch => froca.getNoteFromCache(branch.parentNoteId)?.isLaunchBarConfig())) {+ if (loadResults.getBranchRows().find(branch => froca.getNoteFromCache(branch.parentNoteId)?.isLaunchBarConfig())) {// changes in note placement requires reload of all launchers, all other changes are handled by individual// launchersthis.load();diff --git a/src/public/app/widgets/containers/ribbon_container.js b/src/public/app/widgets/containers/ribbon_container.jsindex e9fbd307cf..31a0f6d1a8 100644--- a/src/public/app/widgets/containers/ribbon_container.js+++ b/src/public/app/widgets/containers/ribbon_container.js@@ -346,7 +346,7 @@ export default class RibbonContainer extends NoteContextAwareWidget {this.refresh();}- else if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {+ else if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {this.refreshWithNote(this.note, true);}}diff --git a/src/public/app/widgets/dialogs/bulk_actions.js b/src/public/app/widgets/dialogs/bulk_actions.jsindex fedd34e01b..6e635b0504 100644--- a/src/public/app/widgets/dialogs/bulk_actions.js+++ b/src/public/app/widgets/dialogs/bulk_actions.js@@ -147,7 +147,7 @@ export default class BulkActionsDialog extends BasicWidget {entitiesReloadedEvent({loadResults}) {// only refreshing deleted attrs, otherwise components update themselves- if (loadResults.getAttributes().find(attr =>+ if (loadResults.getAttributeRows().find(attr =>attr.type === 'label'&& attr.name === 'action'&& attr.noteId === '_bulkAction'diff --git a/src/public/app/widgets/editability_select.js b/src/public/app/widgets/editability_select.jsindex e03b8849d6..3aedd38e34 100644--- a/src/public/app/widgets/editability_select.js+++ b/src/public/app/widgets/editability_select.js@@ -85,7 +85,7 @@ export default class EditabilitySelectWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(attr => attr.noteId === this.noteId)) {+ if (loadResults.getAttributeRows().find(attr => attr.noteId === this.noteId)) {this.refresh();}}diff --git a/src/public/app/widgets/highlights_list.js b/src/public/app/widgets/highlights_list.jsindex 4e88e9e453..52be3092f6 100644--- a/src/public/app/widgets/highlights_list.js+++ b/src/public/app/widgets/highlights_list.js@@ -232,7 +232,7 @@ export default class HighlightsListWidget extends RightPanelWidget {async entitiesReloadedEvent({loadResults}) {if (loadResults.isNoteContentReloaded(this.noteId)) {await this.refresh();- } else if (loadResults.getAttributes().find(attr => attr.type === 'label'+ } else if (loadResults.getAttributeRows().find(attr => attr.type === 'label'&& (attr.name.toLowerCase().includes('readonly') || attr.name === 'hideHighlightWidget')&& attributeService.isAffecting(attr, this.note))) {await this.refresh();diff --git a/src/public/app/widgets/note_detail.js b/src/public/app/widgets/note_detail.jsindex 833ee93daf..433393330a 100644--- a/src/public/app/widgets/note_detail.js+++ b/src/public/app/widgets/note_detail.js@@ -312,7 +312,7 @@ export default class NoteDetailWidget extends NoteContextAwareWidget {this.triggerEvent('noteTypeMimeChanged', {noteId: this.noteId});}else {- const attrs = loadResults.getAttributes();+ const attrs = loadResults.getAttributeRows();const label = attrs.find(attr =>attr.type === 'label'diff --git a/src/public/app/widgets/note_icon.js b/src/public/app/widgets/note_icon.jsindex ba2bbb6833..03653423a4 100644--- a/src/public/app/widgets/note_icon.js+++ b/src/public/app/widgets/note_icon.js@@ -129,7 +129,7 @@ export default class NoteIconWidget extends NoteContextAwareWidget {return;}- for (const attr of loadResults.getAttributes()) {+ for (const attr of loadResults.getAttributeRows()) {if (attr.type === 'label'&& ['iconClass', 'workspaceIconClass'].includes(attr.name)&& attributeService.isAffecting(attr, this.note)) {diff --git a/src/public/app/widgets/note_list.js b/src/public/app/widgets/note_list.jsindex 37b27e0c59..5c8026163c 100644--- a/src/public/app/widgets/note_list.js+++ b/src/public/app/widgets/note_list.js@@ -93,7 +93,7 @@ export default class NoteListWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(attr => attr.noteId === this.noteId && ['viewType', 'expanded', 'pageSize'].includes(attr.name))) {+ if (loadResults.getAttributeRows().find(attr => attr.noteId === this.noteId && ['viewType', 'expanded', 'pageSize'].includes(attr.name))) {this.shownNoteId = null; // force renderthis.checkRenderStatus();diff --git a/src/public/app/widgets/note_map.js b/src/public/app/widgets/note_map.jsindex 65fceedd2e..88210efb21 100644--- a/src/public/app/widgets/note_map.js+++ b/src/public/app/widgets/note_map.js@@ -429,7 +429,7 @@ export default class NoteMapWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes(this.componentId).find(+ if (loadResults.getAttributeRows(this.componentId).find(attr =>attr.type === 'label'&& ['mapType', 'mapRootNoteId'].includes(attr.name)diff --git a/src/public/app/widgets/note_tree.js b/src/public/app/widgets/note_tree.jsindex 025be454ef..5d3c6ede89 100644--- a/src/public/app/widgets/note_tree.js+++ b/src/public/app/widgets/note_tree.js@@ -1082,7 +1082,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {const noteIdsToUpdate = new Set();const noteIdsToReload = new Set();- for (const ecAttr of loadResults.getAttributes()) {+ for (const ecAttr of loadResults.getAttributeRows()) {const dirtyingLabels = ['iconClass', 'cssClass', 'workspace', 'workspaceIconClass', 'color'];if (ecAttr.type === 'label' && dirtyingLabels.includes(ecAttr.name)) {@@ -1124,10 +1124,10 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {let movedActiveNode = null;let parentsOfAddedNodes = [];- const allBranches = loadResults.getBranches();- const allBranchesDeleted = allBranches.every(branch => !!branch.isDeleted);+ const allBranchRows = loadResults.getBranchRows();+ const allBranchesDeleted = allBranchRows.every(branch => !!branch.isDeleted);- for (const ecBranch of allBranches) {+ for (const ecBranch of allBranchRows) {if (ecBranch.parentNoteId === '_share') {// all shared notes have a sign in the tree, even the descendants of shared notesnoteIdsToReload.add(ecBranch.noteId);diff --git a/src/public/app/widgets/note_wrapper.js b/src/public/app/widgets/note_wrapper.jsindex c91e42e80b..a724c3b6db 100644--- a/src/public/app/widgets/note_wrapper.js+++ b/src/public/app/widgets/note_wrapper.js@@ -60,7 +60,7 @@ export default class NoteWrapperWidget extends FlexContainer {const noteId = this.noteContext?.noteId;if (loadResults.isNoteReloaded(noteId)- || loadResults.getAttributes().find(attr => attr.type === 'label' && attr.name === 'cssClass' && attributeService.isAffecting(attr, this.noteContext?.note))) {+ || loadResults.getAttributeRows().find(attr => attr.type === 'label' && attr.name === 'cssClass' && attributeService.isAffecting(attr, this.noteContext?.note))) {this.refresh();}diff --git a/src/public/app/widgets/ribbon_widgets/book_properties.js b/src/public/app/widgets/ribbon_widgets/book_properties.jsindex 3bc1e51fcc..48861150dd 100644--- a/src/public/app/widgets/ribbon_widgets/book_properties.js+++ b/src/public/app/widgets/ribbon_widgets/book_properties.js@@ -108,7 +108,7 @@ export default class BookPropertiesWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(attr => attr.noteId === this.noteId && attr.name === 'viewType')) {+ if (loadResults.getAttributeRows().find(attr => attr.noteId === this.noteId && attr.name === 'viewType')) {this.refresh();}}diff --git a/src/public/app/widgets/ribbon_widgets/inherited_attribute_list.js b/src/public/app/widgets/ribbon_widgets/inherited_attribute_list.jsindex 01031686e3..9445d088a9 100644--- a/src/public/app/widgets/ribbon_widgets/inherited_attribute_list.js+++ b/src/public/app/widgets/ribbon_widgets/inherited_attribute_list.js@@ -107,7 +107,7 @@ export default class InheritedAttributesWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {+ if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {this.refresh();}}diff --git a/src/public/app/widgets/ribbon_widgets/note_paths.js b/src/public/app/widgets/ribbon_widgets/note_paths.jsindex e57b75e8fb..7d8f2102d5 100644--- a/src/public/app/widgets/ribbon_widgets/note_paths.js+++ b/src/public/app/widgets/ribbon_widgets/note_paths.js@@ -135,7 +135,7 @@ export default class NotePathsWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getBranches().find(branch => branch.noteId === this.noteId)+ if (loadResults.getBranchRows().find(branch => branch.noteId === this.noteId)|| loadResults.isNoteReloaded(this.noteId)) {this.refresh();diff --git a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js b/src/public/app/widgets/ribbon_widgets/promoted_attributes.jsindex d9aa57419c..8293875ee1 100644--- a/src/public/app/widgets/ribbon_widgets/promoted_attributes.js+++ b/src/public/app/widgets/ribbon_widgets/promoted_attributes.js@@ -318,7 +318,7 @@ export default class PromotedAttributesWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {+ if (loadResults.getAttributeRows(this.componentId).find(attr => attributeService.isAffecting(attr, this.note))) {this.refresh();}}diff --git a/src/public/app/widgets/ribbon_widgets/search_definition.js b/src/public/app/widgets/ribbon_widgets/search_definition.jsindex baa6dfdd92..d30484bc65 100644--- a/src/public/app/widgets/ribbon_widgets/search_definition.js+++ b/src/public/app/widgets/ribbon_widgets/search_definition.js@@ -312,7 +312,7 @@ export default class SearchDefinitionWidget extends NoteContextAwareWidget {entitiesReloadedEvent({loadResults}) {// only refreshing deleted attrs, otherwise components update themselves- if (loadResults.getAttributes().find(attr => attr.type === 'label' && attr.name === 'action' && attr.isDeleted)) {+ if (loadResults.getAttributeRows().find(attr => attr.type === 'label' && attr.name === 'action' && attr.isDeleted)) {this.refresh();}}diff --git a/src/public/app/widgets/shared_info.js b/src/public/app/widgets/shared_info.jsindex ebdfbb1088..72429272e5 100644--- a/src/public/app/widgets/shared_info.js+++ b/src/public/app/widgets/shared_info.js@@ -62,10 +62,10 @@ export default class SharedInfoWidget extends NoteContextAwareWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(attr => attr.name.startsWith('_share') && attributeService.isAffecting(attr, this.note))) {+ if (loadResults.getAttributeRows().find(attr => attr.name.startsWith('_share') && attributeService.isAffecting(attr, this.note))) {this.refresh();}- else if (loadResults.getBranches().find(branch => branch.noteId === this.noteId)) {+ else if (loadResults.getBranchRows().find(branch => branch.noteId === this.noteId)) {this.refresh();}}diff --git a/src/public/app/widgets/shared_switch.js b/src/public/app/widgets/shared_switch.jsindex a7aaa1e529..c779db22cd 100644--- a/src/public/app/widgets/shared_switch.js+++ b/src/public/app/widgets/shared_switch.js@@ -69,7 +69,7 @@ export default class SharedSwitchWidget extends SwitchWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getBranches().find(b => b.noteId === this.noteId)) {+ if (loadResults.getBranchRows().find(b => b.noteId === this.noteId)) {this.refresh();}}diff --git a/src/public/app/widgets/tab_row.js b/src/public/app/widgets/tab_row.jsindex 17f478a477..3308d2449e 100644--- a/src/public/app/widgets/tab_row.js+++ b/src/public/app/widgets/tab_row.js@@ -681,7 +681,7 @@ export default class TabRowWidget extends BasicWidget {}if (loadResults.isNoteReloaded(noteContext.noteId) ||- loadResults.getAttributes().find(attr =>+ loadResults.getAttributeRows().find(attr =>['workspace', 'workspaceIconClass', 'workspaceTabBackgroundColor'].includes(attr.name)&& attributeService.isAffecting(attr, noteContext.note))) {diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.jsindex 1c7418d05f..604d3bf805 100644--- a/src/public/app/widgets/toc.js+++ b/src/public/app/widgets/toc.js@@ -226,7 +226,7 @@ export default class TocWidget extends RightPanelWidget {async entitiesReloadedEvent({loadResults}) {if (loadResults.isNoteContentReloaded(this.noteId)) {await this.refresh();- } else if (loadResults.getAttributes().find(attr => attr.type === 'label'+ } else if (loadResults.getAttributeRows().find(attr => attr.type === 'label'&& (attr.name.toLowerCase().includes('readonly') || attr.name === 'toc')&& attributeService.isAffecting(attr, this.note))) {diff --git a/src/public/app/widgets/type_widgets/attachment_detail.js b/src/public/app/widgets/type_widgets/attachment_detail.jsindex 0321d54400..95efd5fdd2 100644--- a/src/public/app/widgets/type_widgets/attachment_detail.js+++ b/src/public/app/widgets/type_widgets/attachment_detail.js@@ -72,7 +72,7 @@ export default class AttachmentDetailTypeWidget extends TypeWidget {}async entitiesReloadedEvent({loadResults}) {- const attachmentChange = loadResults.getAttachments().find(att => att.attachmentId === this.attachmentId);+ const attachmentChange = loadResults.getAttachmentRows().find(att => att.attachmentId === this.attachmentId);if (attachmentChange?.isDeleted) {this.refresh(); // all other updates are handled within AttachmentDetailWidgetdiff --git a/src/public/app/widgets/type_widgets/attachment_list.js b/src/public/app/widgets/type_widgets/attachment_list.jsindex 522e40dcd8..6ba5df21b5 100644--- a/src/public/app/widgets/type_widgets/attachment_list.js+++ b/src/public/app/widgets/type_widgets/attachment_list.js@@ -1,5 +1,4 @@import TypeWidget from "./type_widget.js";-import server from "../../services/server.js";import AttachmentDetailWidget from "../attachment_detail.js";import linkService from "../../services/link.js";@@ -72,7 +71,7 @@ export default class AttachmentListTypeWidget extends TypeWidget {async entitiesReloadedEvent({loadResults}) {// updates and deletions are handled by the detail, for new attachments the whole list has to be refreshed- const attachmentsAdded = loadResults.getAttachments()+ const attachmentsAdded = loadResults.getAttachmentRows().some(att => !this.renderedAttachmentIds.has(att.attachmentId));if (attachmentsAdded) {diff --git a/src/public/app/widgets/type_widgets/web_view.js b/src/public/app/widgets/type_widgets/web_view.jsindex 766bb608b3..34e8fa65c8 100644--- a/src/public/app/widgets/type_widgets/web_view.js+++ b/src/public/app/widgets/type_widgets/web_view.js@@ -66,7 +66,7 @@ export default class WebViewTypeWidget extends TypeWidget {}entitiesReloadedEvent({loadResults}) {- if (loadResults.getAttributes().find(attr => attr.name === 'webViewSrc' && attributeService.isAffecting(attr, this.noteContext.note))) {+ if (loadResults.getAttributeRows().find(attr => attr.name === 'webViewSrc' && attributeService.isAffecting(attr, this.noteContext.note))) {this.refresh();}}