mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 /资源 支持搜索未索引的文件 https://github.com/siyuan-note/siyuan/issues/5416
This commit is contained in:
parent
6e02c3e930
commit
4a64f5592f
7 changed files with 96 additions and 33 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
|
|
@ -54,6 +55,9 @@ func watchAssets() {
|
|||
if watcher.Write == event.Op {
|
||||
IncSync()
|
||||
}
|
||||
|
||||
// 重新缓存资源文件,以便使用 /资源 搜索
|
||||
cache.LoadAssets()
|
||||
case err, ok := <-assetsWatcher.Error:
|
||||
if !ok {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue