mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Update av export
This commit is contained in:
parent
3cd6e0d953
commit
376384d4e3
5 changed files with 58 additions and 32 deletions
|
|
@ -86,11 +86,11 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
return
|
||||
}
|
||||
|
||||
func RenderAttributeView(avID, nodeID string) (viewable av.Viewable, attrView *av.AttributeView, err error) {
|
||||
func RenderAttributeView(avID string) (viewable av.Viewable, attrView *av.AttributeView, err error) {
|
||||
waitForSyncingStorages()
|
||||
|
||||
if avJSONPath := av.GetAttributeViewDataPath(avID); !gulu.File.IsExist(avJSONPath) {
|
||||
attrView = av.NewAttributeView(avID, nodeID)
|
||||
attrView = av.NewAttributeView(avID)
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return
|
||||
|
|
@ -103,14 +103,6 @@ func RenderAttributeView(avID, nodeID string) (viewable av.Viewable, attrView *a
|
|||
return
|
||||
}
|
||||
|
||||
if "" == attrView.NodeID {
|
||||
attrView.NodeID = nodeID
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if 1 > len(attrView.Views) {
|
||||
err = av.ErrViewNotFound
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue