mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15661
This commit is contained in:
parent
1b3e1b4efe
commit
ef643e60d7
1 changed files with 21 additions and 1 deletions
|
@ -4217,7 +4217,26 @@ func RemoveAttributeViewKey(avID, keyID string, removeRelationDest bool) (err er
|
|||
return
|
||||
}
|
||||
|
||||
refreshRelatedSrcAvs(avID)
|
||||
relatedAvIDs := av.GetSrcAvIDs(avID)
|
||||
for _, relatedAvID := range relatedAvIDs {
|
||||
destAv, _ := av.ParseAttributeView(relatedAvID)
|
||||
if nil == destAv {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, keyValues := range destAv.KeyValues {
|
||||
if av.KeyTypeRollup == keyValues.Key.Type && keyValues.Key.Rollup.KeyID == keyID {
|
||||
// 置空关联过来的汇总
|
||||
for _, val := range keyValues.Values {
|
||||
val.Rollup.Contents = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
regenAttrViewGroups(destAv, "force")
|
||||
av.SaveAttributeView(destAv)
|
||||
ReloadAttrView(destAv.ID)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -4564,6 +4583,7 @@ func refreshRelatedSrcAvs(destAvID string) {
|
|||
if nil == destAv {
|
||||
continue
|
||||
}
|
||||
|
||||
regenAttrViewGroups(destAv, "force")
|
||||
av.SaveAttributeView(destAv)
|
||||
ReloadAttrView(relatedAvID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue