mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Rename API
This commit is contained in:
committed by
Benoit Marty
parent
bd43d86ec5
commit
5e8f06221f
+2
-2
@@ -36,10 +36,10 @@ class AccountProviderDataSource(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setUrl(url: String) {
|
fun setUrl(url: String) {
|
||||||
userSelection(createAccountProvider(url))
|
setAccountProvider(createAccountProvider(url))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun userSelection(data: AccountProvider) {
|
fun setAccountProvider(data: AccountProvider) {
|
||||||
accountProvider.tryEmit(data)
|
accountProvider.tryEmit(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@ class ChangeServerPresenter(
|
|||||||
throw ChangeServerError.UnsupportedServer
|
throw ChangeServerError.UnsupportedServer
|
||||||
}
|
}
|
||||||
// Homeserver is valid, remember user choice
|
// Homeserver is valid, remember user choice
|
||||||
accountProviderDataSource.userSelection(data)
|
accountProviderDataSource.setAccountProvider(data)
|
||||||
}.runCatchingUpdatingState(changeServerAction, errorTransform = ChangeServerError::from)
|
}.runCatchingUpdatingState(changeServerAction, errorTransform = ChangeServerError::from)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -86,7 +86,7 @@ class AccountProviderDataSourceTest {
|
|||||||
sut.flow.test {
|
sut.flow.test {
|
||||||
val initialState = awaitItem()
|
val initialState = awaitItem()
|
||||||
assertThat(initialState.url).isEqualTo(AuthenticationConfig.MATRIX_ORG_URL)
|
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()
|
val changedState = awaitItem()
|
||||||
assertThat(changedState).isEqualTo(
|
assertThat(changedState).isEqualTo(
|
||||||
AccountProvider(
|
AccountProvider(
|
||||||
|
|||||||
Reference in New Issue
Block a user