Browse Source

Apply `.toImmutableList()` only once.

pull/2928/head
Benoit Marty 4 months ago
parent
commit
ab99137baf
  1. 4
      features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt

4
features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt

@ -87,7 +87,7 @@ class NotificationSettingsPresenter @Inject constructor( @@ -87,7 +87,7 @@ class NotificationSettingsPresenter @Inject constructor(
}
// List of Distributor names
val distributorNames = remember {
distributors.map { it.second.name }
distributors.map { it.second.name }.toImmutableList()
}
var currentDistributorName by remember { mutableStateOf<AsyncAction<String>>(AsyncAction.Uninitialized) }
@ -164,7 +164,7 @@ class NotificationSettingsPresenter @Inject constructor( @@ -164,7 +164,7 @@ class NotificationSettingsPresenter @Inject constructor(
),
changeNotificationSettingAction = changeNotificationSettingAction.value,
currentPushDistributor = currentDistributorName,
availablePushDistributors = distributorNames.toImmutableList(),
availablePushDistributors = distributorNames,
showChangePushProviderDialog = showChangePushProviderDialog,
eventSink = ::handleEvents
)

Loading…
Cancel
Save