mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2542 App | Tech | Remove legacy
This commit is contained in:
parent
22690da7ef
commit
0858af52f1
7 changed files with 0 additions and 99 deletions
|
@ -308,20 +308,6 @@ class BlockDataRepository(
|
|||
)
|
||||
}
|
||||
|
||||
override suspend fun setActiveDataViewViewer(
|
||||
context: Id,
|
||||
block: Id,
|
||||
view: Id,
|
||||
offset: Int,
|
||||
limit: Int
|
||||
): Payload = remote.setActiveDataViewViewer(
|
||||
context = context,
|
||||
block = block,
|
||||
view = view,
|
||||
offset = offset,
|
||||
limit = limit
|
||||
)
|
||||
|
||||
override suspend fun addRelationToDataView(
|
||||
ctx: Id,
|
||||
dv: Id,
|
||||
|
|
|
@ -102,14 +102,6 @@ interface BlockRemote {
|
|||
objectType: String?
|
||||
): Response.Set.Create
|
||||
|
||||
suspend fun setActiveDataViewViewer(
|
||||
context: Id,
|
||||
block: Id,
|
||||
view: Id,
|
||||
offset: Int,
|
||||
limit: Int
|
||||
): Payload
|
||||
|
||||
suspend fun setDataViewViewerPosition(
|
||||
ctx: Id,
|
||||
dv: Id,
|
||||
|
|
|
@ -155,15 +155,6 @@ interface BlockRepository {
|
|||
objectType: String? = null
|
||||
): CreateObjectSet.Response
|
||||
|
||||
@Deprecated("To be deleted")
|
||||
suspend fun setActiveDataViewViewer(
|
||||
context: Id,
|
||||
block: Id,
|
||||
view: Id,
|
||||
offset: Int,
|
||||
limit: Int
|
||||
): Payload
|
||||
|
||||
suspend fun addRelationToDataView(ctx: Id, dv: Id, relation: Key): Payload
|
||||
suspend fun deleteRelationFromDataView(ctx: Id, dv: Id, relation: Key): Payload
|
||||
|
||||
|
|
|
@ -254,20 +254,6 @@ class BlockMiddleware(
|
|||
objectType = objectType
|
||||
)
|
||||
|
||||
override suspend fun setActiveDataViewViewer(
|
||||
context: String,
|
||||
block: String,
|
||||
view: String,
|
||||
offset: Int,
|
||||
limit: Int
|
||||
): Payload = middleware.blockDataViewActiveSet(
|
||||
contextId = context,
|
||||
blockId = block,
|
||||
viewId = view,
|
||||
offset = offset,
|
||||
limit = limit
|
||||
)
|
||||
|
||||
override suspend fun setDataViewViewerPosition(
|
||||
ctx: Id,
|
||||
dv: Id,
|
||||
|
|
|
@ -219,28 +219,6 @@ class Middleware @Inject constructor(
|
|||
return Pair(response.blockId, response.event.toPayload())
|
||||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun blockDataViewActiveSet(
|
||||
contextId: String,
|
||||
blockId: String,
|
||||
viewId: String,
|
||||
offset: Int,
|
||||
limit: Int
|
||||
): Payload {
|
||||
val request = Rpc.BlockDataview.View.SetActive.Request(
|
||||
contextId = contextId,
|
||||
blockId = blockId,
|
||||
viewId = viewId,
|
||||
offset = offset,
|
||||
limit = limit
|
||||
)
|
||||
if (BuildConfig.DEBUG) logRequest(request)
|
||||
val response = service.blockDataViewActiveSet(request)
|
||||
if (BuildConfig.DEBUG) logResponse(response)
|
||||
|
||||
return response.event.toPayload()
|
||||
}
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun blockDataViewViewSetPosition(
|
||||
ctx: Id,
|
||||
|
|
|
@ -296,9 +296,6 @@ interface MiddlewareService {
|
|||
|
||||
//region DATA VIEW commands
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun blockDataViewActiveSet(request: Rpc.BlockDataview.View.SetActive.Request): Rpc.BlockDataview.View.SetActive.Response
|
||||
|
||||
@Throws(Exception::class)
|
||||
fun blockDataViewViewCreate(request: Rpc.BlockDataview.View.Create.Request): Rpc.BlockDataview.View.Create.Response
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.anytypeio.anytype.core_models.exceptions.LoginException
|
|||
import com.anytypeio.anytype.core_models.exceptions.MigrationNeededException
|
||||
import com.anytypeio.anytype.core_models.exceptions.NeedToUpdateApplicationException
|
||||
import com.anytypeio.anytype.core_models.exceptions.SpaceLimitReachedException
|
||||
import com.anytypeio.anytype.core_models.membership.MembershipErrors
|
||||
import com.anytypeio.anytype.core_models.multiplayer.SpaceInviteError
|
||||
import com.anytypeio.anytype.core_utils.tools.FeatureToggles
|
||||
import com.anytypeio.anytype.data.auth.exception.AnytypeNeedsUpgradeException
|
||||
|
@ -15,7 +14,6 @@ import com.anytypeio.anytype.data.auth.exception.UndoRedoExhaustedException
|
|||
import com.anytypeio.anytype.middleware.mappers.toCore
|
||||
import javax.inject.Inject
|
||||
import service.Service
|
||||
import timber.log.Timber
|
||||
|
||||
class MiddlewareServiceImplementation @Inject constructor(
|
||||
featureToggles: FeatureToggles
|
||||
|
@ -184,19 +182,6 @@ class MiddlewareServiceImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
override fun blockDataViewActiveSet(request: Rpc.BlockDataview.View.SetActive.Request): Rpc.BlockDataview.View.SetActive.Response {
|
||||
val encoded = Service.blockDataviewViewSetActive(
|
||||
Rpc.BlockDataview.View.SetActive.Request.ADAPTER.encode(request)
|
||||
)
|
||||
val response = Rpc.BlockDataview.View.SetActive.Response.ADAPTER.decode(encoded)
|
||||
val error = response.error
|
||||
if (error != null && error.code != Rpc.BlockDataview.View.SetActive.Response.Error.Code.NULL) {
|
||||
throw Exception(error.description)
|
||||
} else {
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
override fun blockDataViewRelationAdd(request: Rpc.BlockDataview.Relation.Add.Request): Rpc.BlockDataview.Relation.Add.Response {
|
||||
val encoded = Service.blockDataviewRelationAdd(
|
||||
Rpc.BlockDataview.Relation.Add.Request.ADAPTER.encode(request)
|
||||
|
@ -969,20 +954,6 @@ class MiddlewareServiceImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
//todo relations refactoring
|
||||
// override fun objectRelationOptionAdd(request: Rpc.ObjectRelationOption.Add.Request): Rpc.ObjectRelationOption.Add.Response {
|
||||
// val encoded = Service.objectRelationOptionAdd(
|
||||
// Rpc.ObjectRelationOption.Add.Request.ADAPTER.encode(request)
|
||||
// )
|
||||
// val response = Rpc.ObjectRelationOption.Add.Response.ADAPTER.decode(encoded)
|
||||
// val error = response.error
|
||||
// if (error != null && error.code != Rpc.ObjectRelationOption.Add.Response.Error.Code.NULL) {
|
||||
// throw Exception(error.description)
|
||||
// } else {
|
||||
// return response
|
||||
// }
|
||||
// }
|
||||
|
||||
override fun objectRelationRemoveFeatured(request: Rpc.ObjectRelation.RemoveFeatured.Request): Rpc.ObjectRelation.RemoveFeatured.Response {
|
||||
val encoded = Service.objectRelationRemoveFeatured(
|
||||
Rpc.ObjectRelation.RemoveFeatured.Request.ADAPTER.encode(request)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue