Change screen: propagate current homeserver value

This commit is contained in:
Benoit Marty 2022-11-16 10:42:37 +01:00
parent 8fb60f3b86
commit d96a714bd9
7 changed files with 34 additions and 13 deletions

View file

@ -70,6 +70,10 @@ class Matrix(
}
}
fun getHomeserver(): String? = authService.homeserverDetails()?.url()
fun getHomeserverOrDefault(): String = getHomeserver() ?: "matrix.org"
suspend fun setHomeserver(homeserver: String) {
withContext(coroutineDispatchers.io) {
authService.configureHomeserver(homeserver)