Skip to content

Commit

Permalink
🐛 文档转换标题后文档树刷新不正确 #7435
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Feb 22, 2023
1 parent 685d474 commit 2994a9b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kernel/model/heading.go
Expand Up @@ -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)

Expand Down

0 comments on commit 2994a9b

Please sign in to comment.