From 10d1735688ce534bd927991e9ee6e6a6a0ddc3f3 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 13 Apr 2025 20:32:58 +0800 Subject: [PATCH] :art: Improve tag panel refresh https://github.com/siyuan-note/siyuan/issues/14593 --- kernel/model/search.go | 2 ++ kernel/util/websocket.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/kernel/model/search.go b/kernel/model/search.go index 13492699e..b4aa12115 100644 --- a/kernel/model/search.go +++ b/kernel/model/search.go @@ -799,6 +799,8 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids if "" == n.TextMarkTextContent { unlinks = append(unlinks, n) } + + util.PushReloadTag() } else if n.IsTextMarkType("u") { if !replaceTypes["u"] { return ast.WalkContinue diff --git a/kernel/util/websocket.go b/kernel/util/websocket.go index 6ba724266..a0638d5b0 100644 --- a/kernel/util/websocket.go +++ b/kernel/util/websocket.go @@ -182,6 +182,10 @@ func PushReloadFiletree() { BroadcastByType("filetree", "reloadFiletree", 0, "", nil) } +func PushReloadTag() { + BroadcastByType("main", "reloadTag", 0, "", nil) +} + type BlockStatResult struct { RuneCount int `json:"runeCount"` WordCount int `json:"wordCount"`