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:
parent
ab78f891f0
commit
c349ffbfc4
2 changed files with 10 additions and 5 deletions
|
@ -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) }
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue