Do not override the value of url returned by the SDK
This commit is contained in:
@@ -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.SessionStore
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.rustcomponents.sdk.Client
|
||||
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.
|
||||
private var sessionPaths: SessionPaths? = null
|
||||
private var currentClient: Client? = null
|
||||
private var currentHomeserver = MutableStateFlow<MatrixHomeServerDetails?>(null)
|
||||
|
||||
private val newMatrixClientObservers = mutableListOf<(MatrixClient) -> Unit>()
|
||||
override fun listenToNewMatrixClients(lambda: (MatrixClient) -> Unit) {
|
||||
@@ -119,8 +117,7 @@ class RustMatrixAuthenticationService(
|
||||
}
|
||||
|
||||
currentClient = client
|
||||
val homeServerDetails = client.homeserverLoginDetails().map()
|
||||
homeServerDetails.copy(url = homeserver)
|
||||
client.homeserverLoginDetails().map()
|
||||
}.onFailure {
|
||||
clear()
|
||||
}.mapFailure { failure ->
|
||||
|
||||
Reference in New Issue
Block a user