Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Reduce the delay in adding rows in database table view https://github.com/siyuan-note/siyuan/issues/10082

Daniel4b55a9623c78
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index a9913b8d44..ce5496dd0a 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1691,8 +1691,12 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre
func GetLastSortRow(rows []*av.TableRow) *av.TableRow {
for i := len(rows) - 1; i >= 0; i-- {
row := rows[i]
- block := row.GetBlockValue()
- if nil != block {
+ blockVal := row.GetBlockValue()
+ if nil != blockVal {
+ if nil != blockVal.Block && blockVal.Block.Created == blockVal.Block.Updated {
+ // 说明是刚刚创建的块,跳过
+ continue
+ }
return row
}
}