mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3151 Spaces | Fix | Hot fixes related to applying empty use case + fixes for 'recently opened' widgets (#1935)
This commit is contained in:
parent
57be5a9527
commit
ba86623c70
2 changed files with 20 additions and 9 deletions
|
@ -44,6 +44,7 @@ import com.anytypeio.anytype.core_models.Relation
|
|||
import com.anytypeio.anytype.core_models.RelationFormat
|
||||
import com.anytypeio.anytype.core_models.RelationLink
|
||||
import com.anytypeio.anytype.core_models.RelationListWithValueItem
|
||||
import com.anytypeio.anytype.core_models.Relations
|
||||
import com.anytypeio.anytype.core_models.SpaceUsage
|
||||
import com.anytypeio.anytype.core_models.TimeInSeconds
|
||||
import com.anytypeio.anytype.core_models.chats.Chat
|
||||
|
@ -280,13 +281,23 @@ fun List<MBlock>.toCoreModels(): List<Block> = mapNotNull { block ->
|
|||
)
|
||||
}
|
||||
else -> {
|
||||
Block(
|
||||
id = block.id,
|
||||
fields = block.toCoreModelsFields(),
|
||||
children = block.childrenIds,
|
||||
content = Block.Content.Unsupported,
|
||||
backgroundColor = block.backgroundColor.ifEmpty { null }
|
||||
)
|
||||
if (block.id == Relations.FEATURED_RELATIONS) {
|
||||
Block(
|
||||
id = block.id,
|
||||
fields = block.toCoreModelsFields(),
|
||||
children = block.childrenIds,
|
||||
content = Block.Content.FeaturedRelations,
|
||||
backgroundColor = block.backgroundColor.ifEmpty { null }
|
||||
)
|
||||
} else {
|
||||
Block(
|
||||
id = block.id,
|
||||
fields = block.toCoreModelsFields(),
|
||||
children = block.childrenIds,
|
||||
content = Block.Content.Unsupported,
|
||||
backgroundColor = block.backgroundColor.ifEmpty { null }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -516,8 +516,8 @@ object ObjectSearchConstants {
|
|||
),
|
||||
DVFilter(
|
||||
relation = Relations.LAST_OPENED_DATE,
|
||||
condition = DVFilterCondition.NOT_EQUAL,
|
||||
value = null
|
||||
condition = DVFilterCondition.GREATER,
|
||||
value = 0.0
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue