Browse Source

:art: Filter nesting folder of custom emoji before adding emoji https://github.com/siyuan-note/siyuan/pull/8903

Daniel 1 year ago
parent
commit
b7fd16f62d
2 changed files with 6 additions and 3 deletions
  1. 4 3
      kernel/api/system.go
  2. 2 0
      kernel/model/box.go

+ 4 - 3
kernel/api/system.go

@@ -124,11 +124,12 @@ func getEmojiConf(c *gin.Context) {
 					}
 
 					for _, subCustomEmoji := range subCustomEmojis {
-						name = subCustomEmoji.Name()
-						if strings.HasPrefix(name, ".") {
+						if subCustomEmoji.IsDir() {
 							continue
 						}
-						if subCustomEmoji.IsDir() {
+
+						name = subCustomEmoji.Name()
+						if strings.HasPrefix(name, ".") {
 							continue
 						}
 

+ 2 - 0
kernel/model/box.go

@@ -488,6 +488,8 @@ func FullReindex() {
 	task.AppendTask(task.DatabaseIndexFull, fullReindex)
 	task.AppendTask(task.DatabaseIndexRef, IndexRefs)
 	task.AppendTask(task.ReloadUI, util.ReloadUI)
+
+	ReindexAssetContent()
 }
 
 func fullReindex() {