🎨 Refresh the corresponding rollup after deleting rows from the database https://github.com/siyuan-note/siyuan/issues/10858

This commit is contained in:
Daniel 2024-04-03 21:33:53 +08:00
parent 16dd27d656
commit 24363ad717
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 8 additions and 0 deletions

View file

@ -41,6 +41,9 @@ func GetSrcAvIDs(destAvID string) []string {
if nil == srcAvIDs {
return nil
}
// 排除自己
srcAvIDs = gulu.Str.RemoveElem(srcAvIDs, destAvID)
return srcAvIDs
}

View file

@ -2186,6 +2186,11 @@ func removeAttributeViewBlock(srcIDs []string, avID string, tx *Transaction) (er
}
}
relatedAvIDs := av.GetSrcAvIDs(avID)
for _, relatedAvID := range relatedAvIDs {
util.BroadcastByType("protyle", "refreshAttributeView", 0, "", map[string]interface{}{"id": relatedAvID})
}
err = av.SaveAttributeView(attrView)
return
}