mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 OCR 未启用时不保存 ocr-texts.json https://github.com/siyuan-note/siyuan/issues/11171
This commit is contained in:
parent
af694f6301
commit
e050f760de
1 changed files with 3 additions and 1 deletions
|
|
@ -132,10 +132,12 @@ func SaveAssetsTexts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetAssetText(asset, text string) {
|
func SetAssetText(asset, text string) {
|
||||||
|
var oldText string
|
||||||
assetsTextsLock.Lock()
|
assetsTextsLock.Lock()
|
||||||
|
oldText = assetsTexts[asset]
|
||||||
assetsTexts[asset] = text
|
assetsTexts[asset] = text
|
||||||
assetsTextsLock.Unlock()
|
assetsTextsLock.Unlock()
|
||||||
if "" != text {
|
if oldText != text {
|
||||||
assetsTextsChanged.Store(true)
|
assetsTextsChanged.Store(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue