mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 Improve rollback doc file history https://github.com/siyuan-note/siyuan/issues/11575
This commit is contained in:
parent
ee115ab391
commit
21d7f4a81e
1 changed files with 18 additions and 0 deletions
|
|
@ -273,8 +273,26 @@ func RollbackDocHistory(boxID, historyPath string) (err error) {
|
||||||
IncSync()
|
IncSync()
|
||||||
go func() {
|
go func() {
|
||||||
sql.WaitForWritingDatabase()
|
sql.WaitForWritingDatabase()
|
||||||
|
|
||||||
|
tree, _ = LoadTreeByBlockID(id)
|
||||||
|
if nil == tree {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 刷新关联的动态锚文本 https://github.com/siyuan-note/siyuan/issues/11575
|
// 刷新关联的动态锚文本 https://github.com/siyuan-note/siyuan/issues/11575
|
||||||
refreshDynamicRefText(tree.Root, tree)
|
refreshDynamicRefText(tree.Root, tree)
|
||||||
|
|
||||||
|
// 刷新页签名
|
||||||
|
refText := getNodeRefText(tree.Root)
|
||||||
|
evt := util.NewCmdResult("rename", 0, util.PushModeBroadcast)
|
||||||
|
evt.Data = map[string]interface{}{
|
||||||
|
"box": boxID,
|
||||||
|
"id": tree.Root.ID,
|
||||||
|
"path": tree.Path,
|
||||||
|
"title": tree.Root.IALAttr("title"),
|
||||||
|
"refText": refText,
|
||||||
|
}
|
||||||
|
util.PushEvent(evt)
|
||||||
}()
|
}()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue