diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/util/MatrixCallbackDelegate.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/util/MatrixCallbackDelegate.kt deleted file mode 100644 index 63d37f409f..0000000000 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/util/MatrixCallbackDelegate.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 The Matrix.org Foundation C.I.C. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.matrix.android.sdk.api.util - -import org.matrix.android.sdk.api.MatrixCallback - -/** - * Simple MatrixCallback implementation which delegate its calls to another callback - */ -open class MatrixCallbackDelegate(private val callback: MatrixCallback) : MatrixCallback by callback diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/model/MXQueuedEncryption.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/model/MXQueuedEncryption.kt deleted file mode 100755 index fe6b3a74bb..0000000000 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/model/MXQueuedEncryption.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2020 The Matrix.org Foundation C.I.C. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.matrix.android.sdk.internal.crypto.model - -import org.matrix.android.sdk.api.MatrixCallback -import org.matrix.android.sdk.api.session.events.model.Content - -class MXQueuedEncryption { - - /** - * The data to encrypt. - */ - var eventContent: Content? = null - var eventType: String? = null - - /** - * the asynchronous callback - */ - var apiCallback: MatrixCallback? = null -} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/Try.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/Try.kt index 8786321464..2ce0534b49 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/Try.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/Try.kt @@ -21,7 +21,6 @@ import arrow.core.Success import arrow.core.Try import arrow.core.TryOf import arrow.core.fix -import org.matrix.android.sdk.api.MatrixCallback inline fun TryOf.onError(f: (Throwable) -> Unit): Try = fix() .fold( @@ -32,10 +31,6 @@ inline fun TryOf.onError(f: (Throwable) -> Unit): Try = fix() { Success(it) } ) -fun Try.foldToCallback(callback: MatrixCallback): Unit = fold( - { callback.onFailure(it) }, - { callback.onSuccess(it) }) - /** * Same as doOnNext for Observables */