diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/FilterScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/FilterScreen.kt index 00d1e3bb9acb..7cc375f18588 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/FilterScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/FilterScreen.kt @@ -247,7 +247,8 @@ private fun LazyItemScope.RemovedProvider( state: RelayFilterUiState, onSelectedProvider: (checked: Boolean, providerId: ProviderId) -> Unit, ) { - val checked = providerId in state.selectedProviders + val checked = + state.selectedProviders is Constraint.Only && providerId in state.selectedProviders.value CheckboxCell( title = stringResource(R.string.removed_provider, providerId.value), checked = checked, diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/RelayFilterUiState.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/RelayFilterUiState.kt index d3e8a2b6856c..cd4b2b324f6d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/RelayFilterUiState.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/state/RelayFilterUiState.kt @@ -35,7 +35,11 @@ data class RelayFilterUiState( }.sorted() val isApplyButtonEnabled = selectedProviders.getOrNull()?.isNotEmpty() != false - val removedProviders: List = selectedProviders - allProviders + val removedProviders: List = + when (selectedProviders) { + Constraint.Any -> emptyList() + is Constraint.Only -> selectedProviders.value.toList() - allProviders + } val isAllProvidersChecked = selectedProviders is Constraint.Any }