mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-31 01:48:35 +08:00
feat: add auto sync database list handling and notifications for missing entries
This commit is contained in:
@@ -2,6 +2,7 @@ import { App, Notice, TFile } from "obsidian";
|
||||
import ObsidianSyncNotionPlugin from "../main";
|
||||
import { DatabaseDetails } from "../ui/settingTabs";
|
||||
import { i18nConfig } from "src/lang/I18n";
|
||||
import { AUTO_SYNC_DATABASE_KEY, ensureAutoSyncDatabaseEntry } from "src/utils/frontmatter";
|
||||
|
||||
export async function updateYamlInfo(
|
||||
yamlContent: string,
|
||||
@@ -33,6 +34,12 @@ export async function updateYamlInfo(
|
||||
// add new notionID and link
|
||||
yamlContent[notionIDKey] = id;
|
||||
(NotionLinkDisplay) ? yamlContent[linkKey] = url : null;
|
||||
|
||||
// ensure auto sync database list contains current short name
|
||||
yamlContent[AUTO_SYNC_DATABASE_KEY] = ensureAutoSyncDatabaseEntry(
|
||||
yamlContent[AUTO_SYNC_DATABASE_KEY],
|
||||
abName
|
||||
);
|
||||
});
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user