mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3215 Date as an object | Fix | Space member is removed by swiping (#1968)
This commit is contained in:
parent
5edb38a440
commit
9be32dff13
2 changed files with 2 additions and 12 deletions
|
@ -74,19 +74,11 @@ sealed class ObjectWrapper {
|
|||
|
||||
val featuredRelations: List<Key> get() = getValues(Relations.FEATURED_RELATIONS)
|
||||
|
||||
val smartBlockTypes: List<Double>
|
||||
get() = when (val value = map[Relations.SMARTBLOCKTYPES]) {
|
||||
is Double -> listOf(value)
|
||||
is List<*> -> value.typeOf()
|
||||
else -> emptyList()
|
||||
}
|
||||
|
||||
fun isEmpty(): Boolean = map.isEmpty()
|
||||
|
||||
val relationKey: String by default
|
||||
val isFavorite: Boolean? by default
|
||||
val isHidden: Boolean? by default
|
||||
val isReadonly: Boolean? by default
|
||||
|
||||
val relationFormat: RelationFormat?
|
||||
get() = when (val value = map[Relations.RELATION_FORMAT]) {
|
||||
|
@ -145,9 +137,6 @@ sealed class ObjectWrapper {
|
|||
val targetSpaceId: Id? by default
|
||||
|
||||
val backlinks get() = getValues<Id>(Relations.BACKLINKS)
|
||||
|
||||
val readersLimit: Double? by default
|
||||
val writersLimit: Double? by default
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.anytypeio.anytype.core_models.ObjectWrapper
|
|||
import com.anytypeio.anytype.core_models.RelationListWithValueItem
|
||||
import com.anytypeio.anytype.core_models.Relations
|
||||
import com.anytypeio.anytype.core_models.primitives.SpaceId
|
||||
import com.anytypeio.anytype.core_models.restrictions.ObjectRestriction
|
||||
import com.anytypeio.anytype.domain.misc.UrlBuilder
|
||||
import com.anytypeio.anytype.domain.objects.StoreOfRelations
|
||||
import com.anytypeio.anytype.domain.primitives.FieldParser
|
||||
|
@ -78,6 +79,6 @@ fun ObjectWrapper.Basic.toUiObjectsListItem(
|
|||
}?.name,
|
||||
layout = layout,
|
||||
icon = obj.objectIcon(builder = urlBuilder),
|
||||
isPossibleToDelete = isOwnerOrEditor
|
||||
isPossibleToDelete = isOwnerOrEditor && !restrictions.contains(ObjectRestriction.DELETE)
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue