mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15661
This commit is contained in:
parent
0a680d7d81
commit
1b3e1b4efe
1 changed files with 13 additions and 13 deletions
|
|
@ -3278,16 +3278,13 @@ func removeAttributeViewBlock(srcIDs []string, avID string, tx *Transaction) (er
|
|||
|
||||
regenAttrViewGroups(attrView, "force")
|
||||
|
||||
relatedAvIDs := av.GetSrcAvIDs(avID)
|
||||
for _, relatedAvID := range relatedAvIDs {
|
||||
ReloadAttrView(relatedAvID)
|
||||
}
|
||||
|
||||
err = av.SaveAttributeView(attrView)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
refreshRelatedSrcAvs(avID)
|
||||
|
||||
historyDir, err := GetHistoryDir(HistoryOpUpdate)
|
||||
if err != nil {
|
||||
logging.LogErrorf("get history dir failed: %s", err)
|
||||
|
|
@ -4216,7 +4213,11 @@ func RemoveAttributeViewKey(avID, keyID string, removeRelationDest bool) (err er
|
|||
}
|
||||
}
|
||||
|
||||
err = av.SaveAttributeView(attrView)
|
||||
if err = av.SaveAttributeView(attrView); nil != err {
|
||||
return
|
||||
}
|
||||
|
||||
refreshRelatedSrcAvs(avID)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -4347,11 +4348,6 @@ func BatchUpdateAttributeViewCells(tx *Transaction, avID string, values []interf
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
relatedAvIDs := av.GetSrcAvIDs(avID)
|
||||
for _, relatedAvID := range relatedAvIDs {
|
||||
ReloadAttrView(relatedAvID)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -4557,7 +4553,12 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
|
|||
return
|
||||
}
|
||||
|
||||
relatedAvIDs := av.GetSrcAvIDs(avID)
|
||||
refreshRelatedSrcAvs(avID)
|
||||
return
|
||||
}
|
||||
|
||||
func refreshRelatedSrcAvs(destAvID string) {
|
||||
relatedAvIDs := av.GetSrcAvIDs(destAvID)
|
||||
for _, relatedAvID := range relatedAvIDs {
|
||||
destAv, _ := av.ParseAttributeView(relatedAvID)
|
||||
if nil == destAv {
|
||||
|
|
@ -4567,7 +4568,6 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
|
|||
av.SaveAttributeView(destAv)
|
||||
ReloadAttrView(relatedAvID)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// relationChangeMode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue