BIT-2251: Fix pending login request UI scrolling (#1323)

This commit is contained in:
David Perez 2024-04-30 15:50:47 -05:00 committed by Álison Fernandes
parent b0cae8e553
commit 5a9e9e4af0

View file

@ -19,7 +19,6 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll import androidx.compose.foundation.verticalScroll
import androidx.compose.material.ripple.rememberRipple import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults import androidx.compose.material3.TopAppBarDefaults
@ -46,6 +45,7 @@ import androidx.lifecycle.Lifecycle
import com.x8bit.bitwarden.R import com.x8bit.bitwarden.R
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
import com.x8bit.bitwarden.ui.platform.base.util.LivecycleEventEffect import com.x8bit.bitwarden.ui.platform.base.util.LivecycleEventEffect
import com.x8bit.bitwarden.ui.platform.base.util.bottomDivider
import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar import com.x8bit.bitwarden.ui.platform.components.appbar.BitwardenTopAppBar
import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButtonWithIcon import com.x8bit.bitwarden.ui.platform.components.button.BitwardenFilledTonalButtonWithIcon
import com.x8bit.bitwarden.ui.platform.components.content.BitwardenErrorContent import com.x8bit.bitwarden.ui.platform.components.content.BitwardenErrorContent
@ -199,7 +199,7 @@ private fun PendingRequestsContent(
} }
LazyColumn( LazyColumn(
Modifier.padding(bottom = 16.dp), modifier = Modifier.weight(weight = 1f, fill = false),
) { ) {
items(state.requests) { request -> items(state.requests) { request ->
PendingRequestItem( PendingRequestItem(
@ -209,14 +209,12 @@ private fun PendingRequestsContent(
onNavigateToLoginApproval = onNavigateToLoginApproval, onNavigateToLoginApproval = onNavigateToLoginApproval,
modifier = Modifier modifier = Modifier
.testTag("LoginRequestCell") .testTag("LoginRequestCell")
.fillMaxWidth(), .fillMaxWidth()
) .bottomDivider(),
HorizontalDivider(
thickness = 1.dp,
color = MaterialTheme.colorScheme.outlineVariant,
) )
} }
} }
Spacer(modifier = Modifier.height(16.dp))
BitwardenFilledTonalButtonWithIcon( BitwardenFilledTonalButtonWithIcon(
label = stringResource(id = R.string.decline_all_requests), label = stringResource(id = R.string.decline_all_requests),