Fix compilation warnings.

This commit is contained in:
Benoit Marty
2023-05-23 11:56:08 +02:00
parent d6e60de4ec
commit a2f2cd28f9
3 changed files with 4 additions and 3 deletions

View File

@@ -14,6 +14,8 @@
* limitations under the License.
*/
@file:OptIn(ExperimentalCoroutinesApi::class)
package io.element.android.libraries.matrix.impl
import io.element.android.libraries.core.coroutine.CoroutineDispatchers
@@ -44,6 +46,7 @@ import io.element.android.libraries.matrix.impl.verification.RustSessionVerifica
import io.element.android.libraries.sessionstorage.api.SessionStore
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.Job
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.flow.filter

View File

@@ -105,9 +105,6 @@ class DefaultPushHandler @Inject constructor(
Timber.tag(loggerTag.value).d("## handleInternal()")
}
pushData.roomId ?: return
pushData.eventId ?: return
val clientSecret = pushData.clientSecret
val userId = if (clientSecret == null) {
// Should not happen. In this case, restore default session

View File

@@ -60,6 +60,7 @@ class StateMachine<Event : Any, State : Any>(
currentStateConfig?.onEnter?.invoke(nextState)
}
@Suppress("UNCHECKED_CAST")
private fun <E : Event> findMatchingRoute(event: E): StateMachineRoute<E, State, State>? {
val routesForEvent = routes.filter { it.eventType.isInstance(event) }