Daniel 2025-06-23 17:36:19 +08:00
parent a0f6a6f117
commit dcae07d2e4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 35 additions and 18 deletions

View file

@ -23,6 +23,16 @@ import (
"github.com/siyuan-note/siyuan/kernel/treenode"
)
func checkViewInstance(attrView *av.AttributeView, view *av.View) {
if av.LayoutTypeGallery == view.LayoutType && nil == view.Gallery {
// 切换为画廊视图时可能没有初始化画廊实例 https://github.com/siyuan-note/siyuan/issues/15122
if nil != view.Table {
view.LayoutType = av.LayoutTypeTable
av.SaveAttributeView(attrView)
}
}
}
func upgradeAttributeViewSpec(attrView *av.AttributeView) {
currentSpec := attrView.Spec