1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3438 Widgets | Fix | Add auto-creation flags (#2253)

This commit is contained in:
Evgenii Kozlov 2025-04-08 13:29:06 +02:00 committed by GitHub
parent ab78f891f0
commit c349ffbfc4
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 5 deletions

View file

@ -822,7 +822,8 @@ class Middleware @Inject constructor(
val request = Rpc.File.Upload.Request(
localPath = command.path,
type = type,
spaceId = command.space.id
spaceId = command.space.id,
createTypeWidgetIfMissing = true
)
logRequestIfDebug(request)
val (response, time) = measureTimedValue { service.fileUpload(request) }
@ -886,7 +887,8 @@ class Middleware @Inject constructor(
templateId = command.template.orEmpty(),
internalFlags = command.internalFlags.toMiddlewareModel(),
spaceId = command.space.id,
objectTypeUniqueKey = command.typeKey.key
objectTypeUniqueKey = command.typeKey.key,
createTypeWidgetIfMissing = true
)
logRequestIfDebug(request)
val (response, time) = measureTimedValue { service.objectCreate(request) }

View file

@ -534,7 +534,8 @@ class MiddlewareTest {
val request = Rpc.File.Upload.Request(
localPath = path,
type = Block.Content.File.Type.Image,
spaceId = command.space.id
spaceId = command.space.id,
createTypeWidgetIfMissing = true
)
service.stub {
@ -565,7 +566,8 @@ class MiddlewareTest {
val request = Rpc.File.Upload.Request(
localPath = path,
type = Block.Content.File.Type.File,
spaceId = command.space.id
spaceId = command.space.id,
createTypeWidgetIfMissing = true
)
service.stub {
@ -596,7 +598,8 @@ class MiddlewareTest {
val request = Rpc.File.Upload.Request(
localPath = path,
type = Block.Content.File.Type.Video,
spaceId = command.space.id
spaceId = command.space.id,
createTypeWidgetIfMissing = true
)
service.stub {