Set the value of currentDistributorName by reading again the value from the service.

This commit is contained in:
Benoit Marty 2024-05-28 13:55:29 +02:00
parent bd46321c2a
commit 3349df5a24
3 changed files with 9 additions and 2 deletions

View file

@ -121,7 +121,6 @@ class NotificationSettingsPresenter @Inject constructor(
)
.fold(
{
currentDistributorName = AsyncAction.Success(distributor.name)
refreshPushProvider++
},
{

View file

@ -262,6 +262,7 @@ class NotificationSettingsPresenterTests {
val withNewProvider = awaitItem()
assertThat(withNewProvider.showChangePushProviderDialog).isFalse()
assertThat(withNewProvider.currentPushDistributor).isEqualTo(AsyncAction.Loading)
skipItems(1)
val lastItem = awaitItem()
assertThat(lastItem.currentPushDistributor).isEqualTo(AsyncAction.Success("aDistributorName1"))
cancelAndIgnoreRemainingEvents()