mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 文档转换标题后文档树刷新不正确 https://github.com/siyuan-note/siyuan/issues/7435
This commit is contained in:
parent
685d47452d
commit
2994a9b1d7
1 changed files with 7 additions and 2 deletions
|
|
@ -224,10 +224,15 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
contentPivot.Unlink()
|
||||
}
|
||||
|
||||
// 推送给前端移除旧文档
|
||||
box := Conf.Box(srcTree.Box)
|
||||
if removeErr := box.Remove(srcTree.Path); nil != removeErr {
|
||||
logging.LogWarnf("remove tree [%s] failed: %s", srcTree.Path, removeErr)
|
||||
}
|
||||
box.removeSort([]string{srcTree.ID})
|
||||
RemoveRecentDoc([]string{srcTree.ID})
|
||||
evt := util.NewCmdResult("removeDoc", 0, util.PushModeBroadcast)
|
||||
evt.Data = map[string]interface{}{
|
||||
"ids": []string{srcTree.Root.ID},
|
||||
"ids": []string{srcTree.ID},
|
||||
}
|
||||
util.PushEvent(evt)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue