From 144895d5b4b5e490fc88fdcb81e4d88014e42536 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 28 May 2024 14:12:46 +0200 Subject: [PATCH] Apply `.toImmutableList()` only once. --- .../impl/notifications/NotificationSettingsPresenter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt index 24f988552e..3eb8739a99 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt @@ -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.Uninitialized) } @@ -164,7 +164,7 @@ class NotificationSettingsPresenter @Inject constructor( ), changeNotificationSettingAction = changeNotificationSettingAction.value, currentPushDistributor = currentDistributorName, - availablePushDistributors = distributorNames.toImmutableList(), + availablePushDistributors = distributorNames, showChangePushProviderDialog = showChangePushProviderDialog, eventSink = ::handleEvents )