Rename API

This commit is contained in:
Benoit Marty
2025-11-06 17:07:58 +01:00
committed by Benoit Marty
parent 8012dfb01c
commit a3483d1f40
3 changed files with 4 additions and 4 deletions

View File

@@ -36,10 +36,10 @@ class AccountProviderDataSource(
}
fun setUrl(url: String) {
userSelection(createAccountProvider(url))
setAccountProvider(createAccountProvider(url))
}
fun userSelection(data: AccountProvider) {
fun setAccountProvider(data: AccountProvider) {
accountProvider.tryEmit(data)
}

View File

@@ -65,7 +65,7 @@ class ChangeServerPresenter(
throw ChangeServerError.UnsupportedServer
}
// Homeserver is valid, remember user choice
accountProviderDataSource.userSelection(data)
accountProviderDataSource.setAccountProvider(data)
}.runCatchingUpdatingState(changeServerAction, errorTransform = ChangeServerError::from)
}
}

View File

@@ -86,7 +86,7 @@ class AccountProviderDataSourceTest {
sut.flow.test {
val initialState = awaitItem()
assertThat(initialState.url).isEqualTo(AuthenticationConfig.MATRIX_ORG_URL)
sut.userSelection(AccountProvider(url = "https://example.com"))
sut.setAccountProvider(AccountProvider(url = "https://example.com"))
val changedState = awaitItem()
assertThat(changedState).isEqualTo(
AccountProvider(