feat(views/geomap): remove old geo map type

This commit is contained in:
Elian Doran
2025-07-06 20:23:50 +03:00
parent f5a6dfa629
commit 557bfbd1d6
11 changed files with 10 additions and 17 deletions

View File

@@ -1,4 +1,3 @@
import type { AttachmentRow } from "@triliumnext/commons";
import becca from "../becca/becca";
import becca_loader from "../becca/becca_loader";
import cls from "../services/cls.js";
@@ -12,7 +11,7 @@ export default () => {
hidden_subtree.checkHiddenSubtree(true);
for (const note of Object.values(becca.notes)) {
if (note.type !== "geoMap") {
if (note.type as string !== "geoMap") {
continue;
}

View File

@@ -102,7 +102,7 @@ eventService.subscribe(eventService.ENTITY_CREATED, ({ entityName, entity }) =>
const content = note.getContent();
if (
["text", "code", "mermaid", "canvas", "relationMap", "mindMap", "geoMap"].includes(note.type) &&
["text", "code", "mermaid", "canvas", "relationMap", "mindMap"].includes(note.type) &&
typeof content === "string" &&
// if the note has already content we're not going to overwrite it with template's one
(!content || content.trim().length === 0) &&

View File

@@ -15,7 +15,6 @@ const noteTypes = [
{ type: "doc", defaultMime: "" },
{ type: "contentWidget", defaultMime: "" },
{ type: "mindMap", defaultMime: "application/json" },
{ type: "geoMap", defaultMime: "application/json" },
{ type: "aiChat", defaultMime: "application/json" }
];