🎨 OCR 未启用时不保存 ocr-texts.json https://github.com/siyuan-note/siyuan/issues/11171

This commit is contained in:
Daniel 2024-04-29 16:30:46 +08:00
parent af694f6301
commit e050f760de
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -132,10 +132,12 @@ func SaveAssetsTexts() {
}
func SetAssetText(asset, text string) {
var oldText string
assetsTextsLock.Lock()
oldText = assetsTexts[asset]
assetsTexts[asset] = text
assetsTextsLock.Unlock()
if "" != text {
if oldText != text {
assetsTextsChanged.Store(true)
}
}