Skip to content

Commit

Permalink
🎨 Database-bound block primary key supports setting static anchor text
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 4, 2025
1 parent f425480 commit 905403b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,7 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID string, valueDa
if blockText == content {
updateStaticText = false
} else {
val.Block.Content = blockText
val.Block.Content = content
}
}

Expand Down
9 changes: 8 additions & 1 deletion kernel/model/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -1313,10 +1313,17 @@ func upsertAvBlockRel(node *ast.Node) {
})
}

affectedAvIDs = gulu.Str.RemoveDuplicatedElem(affectedAvIDs)
go func() {
time.Sleep(100 * time.Millisecond)
sql.FlushQueue()

affectedAvIDs = gulu.Str.RemoveDuplicatedElem(affectedAvIDs)
var relatedAvIDs []string
for _, avID := range affectedAvIDs {
relatedAvIDs = append(relatedAvIDs, av.GetSrcAvIDs(avID)...)
}
affectedAvIDs = append(affectedAvIDs, relatedAvIDs...)
affectedAvIDs = gulu.Str.RemoveDuplicatedElem(affectedAvIDs)
for _, avID := range affectedAvIDs {
ReloadAttrView(avID)
}
Expand Down

0 comments on commit 905403b

Please sign in to comment.