chore: address requested changes

This commit is contained in:
Elian Doran 2026-01-23 15:02:33 +02:00
parent 78c62be823
commit e3fdae8932
No known key found for this signature in database
2 changed files with 3 additions and 6 deletions

View File

@ -125,9 +125,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps<CalendarVi
// Subnote attribute change.
if (loadResults.getAttributeRows(parentComponent?.componentId).some((a) => noteIds.includes(a.noteId ?? ""))) {
// Defer execution after the load results are processed so that the event builder has the updated data to work with.
setTimeout(() => {
calendarRef.current?.refetchEvents();
}, 0);
setTimeout(() => api.refetchEvents(), 0);
return; // early return since we'll refresh the events anyway
}

View File

@ -1,5 +1,4 @@
import type { AttachmentRow, AttributeRow, BranchRow, NoteRow } from "@triliumnext/commons";
import { dayjs } from "@triliumnext/commons";
import { type AttachmentRow, type AttributeRow, type BranchRow, dayjs, type NoteRow } from "@triliumnext/commons";
import fs from "fs";
import html2plaintext from "html2plaintext";
import { t } from "i18next";
@ -15,7 +14,7 @@ import ValidationError from "../errors/validation_error.js";
import cls from "../services/cls.js";
import log from "../services/log.js";
import protectedSessionService from "../services/protected_session.js";
import { newEntityId, quoteRegex, toMap,unescapeHtml } from "../services/utils.js";
import { newEntityId, quoteRegex, toMap, unescapeHtml } from "../services/utils.js";
import dateUtils from "./date_utils.js";
import entityChangesService from "./entity_changes.js";
import eventService from "./events.js";