Do not check the baseURL to override if it is the same than the one previously known and used

This commit is contained in:
Benoit Marty 2021-07-27 09:59:01 +02:00
parent bdbfbe6175
commit 4caf333769

View file

@ -49,6 +49,8 @@ internal class DefaultSessionCreator @Inject constructor(
// remove trailing "/" // remove trailing "/"
?.trim { it == '/' } ?.trim { it == '/' }
?.takeIf { it.isNotBlank() } ?.takeIf { it.isNotBlank() }
// It can be the same value, so in this case, do not check again the validity
?.takeIf { it != homeServerConnectionConfig.homeServerUriBase.toString() }
?.also { Timber.d("Overriding homeserver url to $it (will check if valid)") } ?.also { Timber.d("Overriding homeserver url to $it (will check if valid)") }
?.let { Uri.parse(it) } ?.let { Uri.parse(it) }
?.takeIf { ?.takeIf {