diff --git a/app/src/assets/scss/main/_mobile.scss b/app/src/assets/scss/main/_mobile.scss index 50aee38c8..6aacc4c23 100644 --- a/app/src/assets/scss/main/_mobile.scss +++ b/app/src/assets/scss/main/_mobile.scss @@ -21,7 +21,7 @@ font-size: 16px; line-height: 40px; - &:hover { + &:not(.b3-list-item--focus):hover { background-color: transparent !important; } diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index d8df81f0e..ededaefd5 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -241,6 +241,8 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group if !av.MSelectExistOption(newValue.MSelect, groupView.GetGroupValue()) { if 1 > len(newValue.MSelect) || av.KeyTypeMSelect == groupKey.Type { newValue.MSelect = append(newValue.MSelect, &av.ValueSelect{Content: opt.Name, Color: opt.Color}) + } else { + newValue.MSelect = []*av.ValueSelect{{Content: opt.Name, Color: opt.Color}} } } else { var vals []*av.ValueSelect @@ -3987,11 +3989,18 @@ func sortAttributeViewRow(operation *Operation) (err error) { if targetGroupView := view.GetGroupByID(operation.TargetGroupID); nil != targetGroupView && !gulu.Str.Contains(itemID, targetGroupView.GroupItemIDs) { fillDefaultValue(attrView, view, targetGroupView, operation.PreviousID, itemID, false) - // 移除旧分组的值 if val := attrView.GetValue(groupKey.ID, itemID); nil != val { if av.MSelectExistOption(val.MSelect, groupView.GetGroupValue()) { + // 移除旧分组的值 val.MSelect = av.MSelectRemoveOption(val.MSelect, groupView.GetGroupValue()) } + + now := time.Now().UnixMilli() + val.SetUpdatedAt(now) + if blockVal := attrView.GetBlockValue(itemID); nil != blockVal { + blockVal.Block.Updated = now + blockVal.SetUpdatedAt(now) + } } for i, r := range targetGroupView.GroupItemIDs { diff --git a/kernel/model/file.go b/kernel/model/file.go index 66d682646..090984691 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -978,12 +978,6 @@ func DuplicateDoc(tree *parse.Tree) { previousPath := tree.Path resetTree(tree, "Duplicated", false) - createTreeTx(tree) - box := Conf.Box(tree.Box) - if nil != box { - box.addSort(previousPath, tree.ID) - } - FlushTxQueue() // 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294 ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus { @@ -996,6 +990,13 @@ func DuplicateDoc(tree *parse.Tree) { n.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText) return ast.WalkContinue }) + + createTreeTx(tree) + box := Conf.Box(tree.Box) + if nil != box { + box.addSort(previousPath, tree.ID) + } + FlushTxQueue() return }