mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-25 10:55:55 +03:00
Remove dead code
This commit is contained in:
parent
bf65531268
commit
af9fa44e8c
3 changed files with 0 additions and 63 deletions
|
@ -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<T>(private val callback: MatrixCallback<T>) : MatrixCallback<T> by callback
|
|
@ -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<Content>? = null
|
||||
}
|
|
@ -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 <A> TryOf<A>.onError(f: (Throwable) -> Unit): Try<A> = fix()
|
||||
.fold(
|
||||
|
@ -32,10 +31,6 @@ inline fun <A> TryOf<A>.onError(f: (Throwable) -> Unit): Try<A> = fix()
|
|||
{ Success(it) }
|
||||
)
|
||||
|
||||
fun <A> Try<A>.foldToCallback(callback: MatrixCallback<A>): Unit = fold(
|
||||
{ callback.onFailure(it) },
|
||||
{ callback.onSuccess(it) })
|
||||
|
||||
/**
|
||||
* Same as doOnNext for Observables
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue