diff --git a/app/src/history/history.ts b/app/src/history/history.ts index a02cd111b..7efcf9e17 100644 --- a/app/src/history/history.ts +++ b/app/src/history/history.ts @@ -198,6 +198,8 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string /// #endif let repoHTML = ""; const isPhone = isMobile(); + const selectId: { id: string, time: string }[] = ["getRepoTagSnapshots", "getRepoSnapshots"].includes(type) ? + JSON.parse(element.querySelector(".b3-button[data-type='compare']").getAttribute("data-ids") || "[]") : []; response.data.snapshots.forEach((item: { memo: string, id: string, @@ -234,8 +236,9 @@ ${window.siyuan.languages.fileCount} ${item.count}${item.id.substring(0, 7)} ${statHTML}`; + const hasSelected = selectId.find(subItem => subItem.id === item.id); /// #if MOBILE - repoHTML += `