diff --git a/apps/client/src/widgets/collections/calendar/index.tsx b/apps/client/src/widgets/collections/calendar/index.tsx index 0bfaaf5b5b..d9195a3c5e 100644 --- a/apps/client/src/widgets/collections/calendar/index.tsx +++ b/apps/client/src/widgets/collections/calendar/index.tsx @@ -125,9 +125,7 @@ export default function CalendarView({ note, noteIds }: ViewModeProps 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 } diff --git a/apps/server/src/services/notes.ts b/apps/server/src/services/notes.ts index a54f9e6340..f4eb40579a 100644 --- a/apps/server/src/services/notes.ts +++ b/apps/server/src/services/notes.ts @@ -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";