mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 23:50:13 +01:00
🎨 Creating a dailynote existed no longer expands the doc tree https://github.com/siyuan-note/siyuan/issues/9959
This commit is contained in:
parent
44bc3c15ef
commit
2953870db5
1 changed files with 10 additions and 0 deletions
|
|
@ -801,6 +801,9 @@ func updateAttributeViewColRelation(operation *Operation) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
isSameAv := srcAv.ID == destAv.ID
|
isSameAv := srcAv.ID == destAv.ID
|
||||||
|
if isSameAv {
|
||||||
|
destAv = srcAv
|
||||||
|
}
|
||||||
|
|
||||||
for _, keyValues := range srcAv.KeyValues {
|
for _, keyValues := range srcAv.KeyValues {
|
||||||
if keyValues.Key.ID == operation.KeyID {
|
if keyValues.Key.ID == operation.KeyID {
|
||||||
|
|
@ -857,6 +860,13 @@ func updateAttributeViewColRelation(operation *Operation) (err error) {
|
||||||
Relation: &av.Relation{AvID: operation.AvID, IsTwoWay: operation.IsTwoWay, BackKeyID: operation.KeyID},
|
Relation: &av.Relation{AvID: operation.AvID, IsTwoWay: operation.IsTwoWay, BackKeyID: operation.KeyID},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
for _, v := range destAv.Views {
|
||||||
|
switch v.LayoutType {
|
||||||
|
case av.LayoutTypeTable:
|
||||||
|
v.Table.Columns = append(v.Table.Columns, &av.ViewTableColumn{ID: operation.KeyID})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = av.SaveAttributeView(srcAv)
|
err = av.SaveAttributeView(srcAv)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue