From 623f30b5fc3de9e900ab574555c8af0f254f37e4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 14 Oct 2023 09:21:44 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/9419 --- app/src/protyle/render/av/action.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 407a889cf..1ea5d30ff 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -337,6 +337,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => { if (newData === nameElement.dataset.title.trim()) { return; } + const newUpdated = dayjs().format("YYYYMMDDHHmmss") transaction(protyle, [{ action: "setAttrViewName", id: avId, @@ -344,7 +345,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => { }, { action: "doUpdateUpdated", id, - data: dayjs().format("YYYYMMDDHHmmss"), + data: newUpdated, }], [{ action: "setAttrViewName", id: avId, @@ -354,6 +355,7 @@ export const updateAVName = (protyle: IProtyle, blockElement: Element) => { id, data: blockElement.getAttribute("updated") }]); + nameElement.setAttribute("updated", newUpdated); nameElement.dataset.title = newData; blockElement.querySelector(".layout-tab-bar .item__text").textContent = newData; };