mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3184 Date as an Object | Filter Creation date by origin (#1925)
This commit is contained in:
parent
b3da591a82
commit
8b46082e29
1 changed files with 14 additions and 1 deletions
|
@ -4,11 +4,13 @@ import com.anytypeio.anytype.core_models.DVFilter
|
|||
import com.anytypeio.anytype.core_models.DVFilterCondition
|
||||
import com.anytypeio.anytype.core_models.DVSort
|
||||
import com.anytypeio.anytype.core_models.Id
|
||||
import com.anytypeio.anytype.core_models.ObjectOrigin
|
||||
import com.anytypeio.anytype.core_models.ObjectType
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeUniqueKeys
|
||||
import com.anytypeio.anytype.core_models.Relation
|
||||
import com.anytypeio.anytype.core_models.RelationFormat
|
||||
import com.anytypeio.anytype.core_models.Relations
|
||||
import com.anytypeio.anytype.core_models.Relations.CREATED_DATE
|
||||
import com.anytypeio.anytype.core_models.Relations.LAST_MODIFIED_DATE
|
||||
import com.anytypeio.anytype.core_models.Relations.RELATION_KEY
|
||||
import com.anytypeio.anytype.core_models.Relations.TYPE
|
||||
|
@ -103,6 +105,17 @@ private fun buildFieldFilters(
|
|||
)
|
||||
)
|
||||
}
|
||||
if (fieldKey == CREATED_DATE) {
|
||||
add(
|
||||
DVFilter(
|
||||
relation = Relations.ORIGIN,
|
||||
condition = DVFilterCondition.NOT_IN,
|
||||
value = listOf(
|
||||
ObjectOrigin.BUILT_IN.code.toDouble()
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
else -> {
|
||||
|
@ -180,4 +193,4 @@ private val SUPPORTED_DATE_OBJECT_LAYOUTS = listOf(
|
|||
ObjectType.Layout.VIDEO,
|
||||
ObjectType.Layout.AUDIO,
|
||||
ObjectType.Layout.PDF
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue