mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 Refresh the corresponding rollup after deleting rows from the database https://github.com/siyuan-note/siyuan/issues/10858
This commit is contained in:
@@ -41,6 +41,9 @@ func GetSrcAvIDs(destAvID string) []string {
|
||||
if nil == srcAvIDs {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 排除自己
|
||||
srcAvIDs = gulu.Str.RemoveElem(srcAvIDs, destAvID)
|
||||
return srcAvIDs
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user