Browse Source

:art: https://github.com/siyuan-note/siyuan/issues/8234

Vanessa 9 months ago
parent
commit
68c1fc8928
1 changed files with 6 additions and 2 deletions
  1. 6 2
      app/src/dialog/processSystem.ts

+ 6 - 2
app/src/dialog/processSystem.ts

@@ -172,6 +172,8 @@ export const setDefRefCount = (data: {
         if (data.rootID === data.blockID && item.protyle.block.rootID === data.rootID) {
         if (data.rootID === data.blockID && item.protyle.block.rootID === data.rootID) {
             const attrElement = item.protyle.title.element.querySelector(".protyle-attr")
             const attrElement = item.protyle.title.element.querySelector(".protyle-attr")
             const countElement = attrElement.querySelector('.popover__block')
             const countElement = attrElement.querySelector('.popover__block')
+            // TODO
+            data.refIds = ["1", "2"]
             if (countElement) {
             if (countElement) {
                 if (data.refCount === 0) {
                 if (data.refCount === 0) {
                     countElement.remove()
                     countElement.remove()
@@ -206,9 +208,12 @@ export const setDefRefCount = (data: {
         });
         });
     })
     })
 
 
+    let liElement;
     /// #if MOBILE
     /// #if MOBILE
+    liElement = window.siyuan.mobile.files.element.querySelector(`li[data-node-id="${data.rootID}"]`)
     /// #else
     /// #else
-    const liElement = (getDockByType("file").data.file as Files).element.querySelector(`li[data-node-id="${data.rootID}"]`)
+    liElement = (getDockByType("file").data.file as Files).element.querySelector(`li[data-node-id="${data.rootID}"]`)
+    /// #endif
     if (liElement) {
     if (liElement) {
         const counterElement = liElement.querySelector(".counter")
         const counterElement = liElement.querySelector(".counter")
         if (counterElement) {
         if (counterElement) {
@@ -221,7 +226,6 @@ export const setDefRefCount = (data: {
             liElement.insertAdjacentHTML("beforeend", `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.ref}">${data.rootRefCount}</span>`)
             liElement.insertAdjacentHTML("beforeend", `<span class="popover__block counter b3-tooltips b3-tooltips__nw" aria-label="${window.siyuan.languages.ref}">${data.rootRefCount}</span>`)
         }
         }
     }
     }
-    /// #endif
 }
 }
 
 
 export const lockScreen = (app: App) => {
 export const lockScreen = (app: App) => {