Do not override the value of url returned by the SDK
This commit is contained in:
parent
6d252c0b20
commit
786d6f5642
1 changed files with 1 additions and 4 deletions
|
|
@ -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 ->
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue