Skip to content

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

:art: Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964

Daniel371945917963
diff --git a/kernel/av/layout.go b/kernel/av/layout.go
index a8d9e1d25b..1e16819fb3 100644
--- a/kernel/av/layout.go
+++ b/kernel/av/layout.go
@@ -75,6 +75,15 @@ type BaseInstance struct {
}
func NewViewBaseInstance(view *View) *BaseInstance {
+ showIcon, wrapField := true, false
+ switch view.LayoutType {
+ case LayoutTypeTable:
+ showIcon = view.Table.ShowIcon
+ wrapField = view.Table.WrapField
+ case LayoutTypeGallery:
+ showIcon = view.Gallery.ShowIcon
+ wrapField = view.Gallery.WrapField
+ }
return &BaseInstance{
ID: view.ID,
Icon: view.Icon,
@@ -89,8 +98,8 @@ func NewViewBaseInstance(view *View) *BaseInstance {
GroupFolded: view.GroupFolded,
GroupHidden: view.GroupHidden,
GroupDefault: view.GroupDefault,
- ShowIcon: view.Table.ShowIcon,
- WrapField: view.Table.WrapField,
+ ShowIcon: showIcon,
+ WrapField: wrapField,
}
}