mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-1814 Settings | Fix | Fix space storage settings (#475)
This commit is contained in:
parent
ba15bf0d87
commit
4153f58042
7 changed files with 18 additions and 18 deletions
|
@ -200,14 +200,15 @@ private fun SelectSpaceProfileHeader(
|
|||
start = 74.dp,
|
||||
end = 74.dp
|
||||
)
|
||||
.clickable { onProfileClicked() }
|
||||
.fillMaxWidth()
|
||||
.noRippleClickable { onProfileClicked() }
|
||||
)
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(end = 30.dp)
|
||||
.size(32.dp)
|
||||
.align(Alignment.CenterEnd)
|
||||
.clickable { onSpaceSettingsClicked() }
|
||||
.noRippleClickable { onSpaceSettingsClicked() }
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = R.drawable.ic_space_settings),
|
||||
|
|
|
@ -403,7 +403,7 @@ class BlockMiddleware(
|
|||
relation = relation
|
||||
)
|
||||
|
||||
override suspend fun debugSpace(space: SpaceId): String = middleware.debugSpace(space)
|
||||
override suspend fun debugSpace(space: SpaceId): String = middleware.debugSpaceSummary(space)
|
||||
|
||||
override suspend fun debugObject(objectId: Id, path: String): String =
|
||||
middleware.debugObject(objectId = objectId, path = path)
|
||||
|
|
|
@ -771,10 +771,10 @@ class Middleware @Inject constructor(
|
|||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun debugSpace(space: SpaceId): String {
|
||||
fun debugSpaceSummary(space: SpaceId): String {
|
||||
val request = Rpc.Debug.SpaceSummary.Request(spaceId = space.id)
|
||||
if (BuildConfig.DEBUG) logRequest(request)
|
||||
val response = service.debugSpace(request)
|
||||
val response = service.debugSpaceSummary(request)
|
||||
if (BuildConfig.DEBUG) logResponse(response)
|
||||
return response.infos.toCoreModel()
|
||||
}
|
||||
|
|
|
@ -425,7 +425,7 @@ interface MiddlewareService {
|
|||
|
||||
//region DEBUG commands
|
||||
@Throws(Exception::class)
|
||||
fun debugSpace(request: Rpc.Debug.SpaceSummary.Request): Rpc.Debug.SpaceSummary.Response
|
||||
fun debugSpaceSummary(request: Rpc.Debug.SpaceSummary.Request): Rpc.Debug.SpaceSummary.Response
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun debugObject(request: Rpc.Debug.Tree.Request): Rpc.Debug.Tree.Response
|
||||
|
|
|
@ -593,7 +593,7 @@ class MiddlewareServiceImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun debugSpace(request: Rpc.Debug.SpaceSummary.Request): Rpc.Debug.SpaceSummary.Response {
|
||||
override fun debugSpaceSummary(request: Rpc.Debug.SpaceSummary.Request): Rpc.Debug.SpaceSummary.Response {
|
||||
val encoded = Service.debugSpaceSummary(Rpc.Debug.SpaceSummary.Request.ADAPTER.encode(request))
|
||||
val response = Rpc.Debug.SpaceSummary.Response.ADAPTER.decode(encoded)
|
||||
val error = response.error
|
||||
|
|
|
@ -10,11 +10,7 @@ import com.anytypeio.anytype.core_models.Id
|
|||
import com.anytypeio.anytype.core_models.Key
|
||||
import com.anytypeio.anytype.core_models.Marketplace.MARKETPLACE_SPACE_ID
|
||||
import com.anytypeio.anytype.core_models.ObjectType
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeIds.AUDIO
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeIds.FILE
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeIds.IMAGE
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeIds.SET
|
||||
import com.anytypeio.anytype.core_models.ObjectTypeIds.VIDEO
|
||||
import com.anytypeio.anytype.core_models.Relations
|
||||
import com.anytypeio.anytype.presentation.objects.SupportedLayouts
|
||||
|
||||
|
@ -784,13 +780,18 @@ object ObjectSearchConstants {
|
|||
value = true
|
||||
),
|
||||
DVFilter(
|
||||
relation = Relations.TYPE,
|
||||
relation = Relations.IS_ARCHIVED,
|
||||
condition = DVFilterCondition.NOT_EQUAL,
|
||||
value = true
|
||||
),
|
||||
DVFilter(
|
||||
relation = Relations.LAYOUT,
|
||||
condition = DVFilterCondition.IN,
|
||||
value = listOf(
|
||||
IMAGE,
|
||||
FILE,
|
||||
VIDEO,
|
||||
AUDIO
|
||||
ObjectType.Layout.IMAGE.code.toDouble(),
|
||||
ObjectType.Layout.FILE.code.toDouble(),
|
||||
ObjectType.Layout.VIDEO.code.toDouble(),
|
||||
ObjectType.Layout.AUDIO.code.toDouble()
|
||||
)
|
||||
),
|
||||
DVFilter(
|
||||
|
|
|
@ -213,11 +213,9 @@ class CollectionViewModel(
|
|||
Subscription.Favorites -> {
|
||||
favoritesSubscriptionFlow().map { it.map { it as CollectionView } }
|
||||
}
|
||||
|
||||
Subscription.Files -> {
|
||||
filesSubscriptionFlow()
|
||||
}
|
||||
|
||||
else -> {
|
||||
subscriptionFlow()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue