mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3641 Widgets | Fix | Fix view layout resolving (#2387)
This commit is contained in:
parent
f3e1594491
commit
add33a7a10
2 changed files with 6 additions and 2 deletions
|
@ -188,7 +188,7 @@ class DataViewListWidgetContainer(
|
|||
)
|
||||
)
|
||||
if (params != null) {
|
||||
if (target?.type == DVViewerType.GALLERY) {
|
||||
if (widget is Widget.View && target?.type == DVViewerType.GALLERY) {
|
||||
galleryWidgetSubscribe(
|
||||
obj = obj,
|
||||
activeView = view,
|
||||
|
@ -336,7 +336,7 @@ class DataViewListWidgetContainer(
|
|||
tabs = emptyList(),
|
||||
elements = emptyList(),
|
||||
isExpanded = true,
|
||||
isCompact = (widget as? Widget.List)?.isCompact ?: false,
|
||||
isCompact = widget.isCompact,
|
||||
name = when(val source = widget.source) {
|
||||
is Widget.Source.Bundled -> WidgetView.Name.Bundled(source = source)
|
||||
is Widget.Source.Default -> WidgetView.Name.Default(
|
||||
|
|
|
@ -79,6 +79,8 @@ class SelectWidgetTypeViewModel(
|
|||
// If the layout is a data view, provide View and Link widgets
|
||||
objectLayout?.isDataView() == true -> listOf(
|
||||
WidgetTypeView.View(),
|
||||
WidgetTypeView.CompactList(),
|
||||
WidgetTypeView.List(),
|
||||
WidgetTypeView.Link()
|
||||
)
|
||||
|
||||
|
@ -145,6 +147,8 @@ class SelectWidgetTypeViewModel(
|
|||
// If the layout is a data view, provide View and Link widgets
|
||||
objectLayout?.isDataView() == true -> listOf(
|
||||
WidgetTypeView.View(isSelected = false),
|
||||
WidgetTypeView.CompactList(),
|
||||
WidgetTypeView.List(),
|
||||
WidgetTypeView.Link(isSelected = false)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue