mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 15:44:54 +00:00
Do not override the value of url returned by the SDK
This commit is contained in:
+1
-4
@@ -36,7 +36,6 @@ import io.element.android.libraries.matrix.impl.paths.SessionPathsFactory
|
|||||||
import io.element.android.libraries.sessionstorage.api.LoginType
|
import io.element.android.libraries.sessionstorage.api.LoginType
|
||||||
import io.element.android.libraries.sessionstorage.api.SessionStore
|
import io.element.android.libraries.sessionstorage.api.SessionStore
|
||||||
import kotlinx.coroutines.CancellationException
|
import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.flow.MutableStateFlow
|
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.matrix.rustcomponents.sdk.Client
|
import org.matrix.rustcomponents.sdk.Client
|
||||||
import org.matrix.rustcomponents.sdk.ClientBuilder
|
import org.matrix.rustcomponents.sdk.ClientBuilder
|
||||||
@@ -66,7 +65,6 @@ class RustMatrixAuthenticationService(
|
|||||||
// Ideally it would be possible to get the sessionPath from the Client to avoid doing this.
|
// Ideally it would be possible to get the sessionPath from the Client to avoid doing this.
|
||||||
private var sessionPaths: SessionPaths? = null
|
private var sessionPaths: SessionPaths? = null
|
||||||
private var currentClient: Client? = null
|
private var currentClient: Client? = null
|
||||||
private var currentHomeserver = MutableStateFlow<MatrixHomeServerDetails?>(null)
|
|
||||||
|
|
||||||
private val newMatrixClientObservers = mutableListOf<(MatrixClient) -> Unit>()
|
private val newMatrixClientObservers = mutableListOf<(MatrixClient) -> Unit>()
|
||||||
override fun listenToNewMatrixClients(lambda: (MatrixClient) -> Unit) {
|
override fun listenToNewMatrixClients(lambda: (MatrixClient) -> Unit) {
|
||||||
@@ -119,8 +117,7 @@ class RustMatrixAuthenticationService(
|
|||||||
}
|
}
|
||||||
|
|
||||||
currentClient = client
|
currentClient = client
|
||||||
val homeServerDetails = client.homeserverLoginDetails().map()
|
client.homeserverLoginDetails().map()
|
||||||
homeServerDetails.copy(url = homeserver)
|
|
||||||
}.onFailure {
|
}.onFailure {
|
||||||
clear()
|
clear()
|
||||||
}.mapFailure { failure ->
|
}.mapFailure { failure ->
|
||||||
|
|||||||
Reference in New Issue
Block a user