Browse Source

:art: Improve sorting for `Add to Database` https://github.com/siyuan-note/siyuan/issues/11286

Daniel 1 năm trước cách đây
mục cha
commit
9a544e2a09
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      kernel/model/attribute_view.go

+ 3 - 0
kernel/model/attribute_view.go

@@ -21,6 +21,7 @@ import (
 	"fmt"
 	"os"
 	"path/filepath"
+	"slices"
 	"sort"
 	"strconv"
 	"strings"
@@ -2216,6 +2217,8 @@ func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr)
 }
 
 func AddAttributeViewBlock(tx *Transaction, srcs []map[string]interface{}, avID, blockID, previousBlockID string, ignoreFillFilter bool) (err error) {
+	slices.Reverse(srcs) // https://github.com/siyuan-note/siyuan/issues/11286
+
 	for _, src := range srcs {
 		srcID := src["id"].(string)
 		isDetached := src["isDetached"].(bool)