1
0
Fork 0
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:
Konstantin Ivanov 2025-01-04 15:20:34 +01:00 committed by GitHub
parent 5edb38a440
commit 9be32dff13
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 12 deletions

View file

@ -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
}
/**

View file

@ -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)
)
}