Hide vault listing divider when only one category exists (#1095)

This commit is contained in:
David Perez 2024-03-05 12:00:54 -06:00 committed by Álison Fernandes
parent e6efc9c288
commit 770e51f43f

View file

@ -34,7 +34,7 @@ import kotlinx.collections.immutable.toPersistentList
/**
* Content view for the [VaultItemListingScreen].
*/
@Suppress("LongMethod")
@Suppress("LongMethod", "CyclomaticComplexMethod")
@Composable
fun VaultItemListingContent(
state: VaultItemListingState.ViewState.Content,
@ -140,7 +140,7 @@ fun VaultItemListingContent(
}
}
if (state.displayItemList.isNotEmpty()) {
if (state.displayItemList.isNotEmpty() && state.displayFolderList.isNotEmpty()) {
item {
HorizontalDivider(
thickness = 1.dp,
@ -150,7 +150,9 @@ fun VaultItemListingContent(
.padding(all = 16.dp),
)
}
}
if (state.displayItemList.isNotEmpty()) {
item {
BitwardenListHeaderTextWithSupportLabel(
label = stringResource(id = R.string.items),