From 5cc6c98ce61ae5b098c4ab0e04cd339125d243ad Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Wed, 3 Apr 2024 11:40:10 +0200 Subject: [PATCH] Fix floating effect for custom list description --- .../mullvadvpn/compose/screen/SelectLocationScreen.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt index 9144903f6393..705877951b9d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt @@ -320,6 +320,7 @@ fun SelectLocationScreen( customLists( customLists = state.filteredCustomLists, selectedItem = state.selectedItem, + backgroundColor = backgroundColor, onSelectRelay = onSelectRelay, onShowCustomListBottomSheet = { bottomSheetState = @@ -375,6 +376,7 @@ private fun LazyListScope.loading() { private fun LazyListScope.customLists( customLists: List, selectedItem: RelayItem?, + backgroundColor: Color, onSelectRelay: (item: RelayItem) -> Unit, onShowCustomListBottomSheet: () -> Unit, onShowEditBottomSheet: (RelayItem.CustomList) -> Unit @@ -413,14 +415,16 @@ private fun LazyListScope.customLists( item { SwitchComposeSubtitleCell( text = stringResource(R.string.to_add_locations_to_a_list), - modifier = Modifier.animateItemPlacement().animateContentSize() + modifier = + Modifier.background(backgroundColor).animateItemPlacement().animateContentSize() ) } } else { item(contentType = ContentType.EMPTY_TEXT) { SwitchComposeSubtitleCell( text = stringResource(R.string.to_create_a_custom_list), - modifier = Modifier.animateItemPlacement().animateContentSize() + modifier = + Modifier.background(backgroundColor).animateItemPlacement().animateContentSize() ) } }