This commit is contained in:
Daniel 2025-06-13 12:00:49 +08:00
parent a615b01084
commit 180bea1eb9
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 38 additions and 10 deletions

View file

@ -2602,7 +2602,12 @@ func removeAttributeViewBlock(srcIDs []string, avID string, tx *Transaction) (er
for _, view := range attrView.Views {
for _, blockID := range srcIDs {
view.Table.RowIDs = gulu.Str.RemoveElem(view.Table.RowIDs, blockID)
switch view.LayoutType {
case av.LayoutTypeTable:
view.Table.RowIDs = gulu.Str.RemoveElem(view.Table.RowIDs, blockID)
case av.LayoutTypeGallery:
view.Gallery.CardIDs = gulu.Str.RemoveElem(view.Gallery.CardIDs, blockID)
}
}
}