Skip to content

Commit

Permalink
Merge pull request #2362 from HedvigInsurance/fix/remove-details-from…
Browse files Browse the repository at this point in the history
…-moving-summary

Fix/remove details from moving summary
  • Loading branch information
panasetskaya authored Dec 19, 2024
2 parents 745f8dd + 59224fe commit b53fae5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ internal fun HedvigNavHost(
)
movingFlowGraph(
navController = hedvigAppState.navController,
onNavigateToNewConversation = { navigateToNewConversation() },
)
connectPaymentGraph(
navigator = navigator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ internal sealed interface MovingFlowDestinations {
}
}

fun NavGraphBuilder.movingFlowGraph(navController: NavController, onNavigateToNewConversation: () -> Unit) {
fun NavGraphBuilder.movingFlowGraph(navController: NavController) {
navgraph<MovingFlowGraphDestination>(
startDestination = MovingFlowDestinations.Start::class,
) {
Expand Down Expand Up @@ -148,7 +148,6 @@ fun NavGraphBuilder.movingFlowGraph(navController: NavController, onNavigateToNe
navigateUp = navController::navigateUp,
navigateBack = navController::popBackStack,
exitFlow = { navController.typedPopBackStack<MovingFlowGraphDestination>(inclusive = true) },
onNavigateToNewConversation = onNavigateToNewConversation,
onNavigateToFinishedScreen = { moveDate ->
navController.navigate(MovingFlowDestinations.SuccessfulMove(moveDate)) {
typedPopUpTo<MovingFlowGraphDestination> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@ import com.hedvig.android.data.productvariant.ProductVariant
import com.hedvig.android.data.productvariant.ProductVariantPeril
import com.hedvig.android.design.system.hedvig.AccordionData
import com.hedvig.android.design.system.hedvig.AccordionList
import com.hedvig.android.design.system.hedvig.ButtonDefaults.ButtonSize.Small
import com.hedvig.android.design.system.hedvig.ErrorDialog
import com.hedvig.android.design.system.hedvig.HedvigAlertDialog
import com.hedvig.android.design.system.hedvig.HedvigButton
import com.hedvig.android.design.system.hedvig.HedvigErrorSection
import com.hedvig.android.design.system.hedvig.HedvigFullScreenCenterAlignedProgress
import com.hedvig.android.design.system.hedvig.HedvigMultiScreenPreview
import com.hedvig.android.design.system.hedvig.HedvigNotificationCard
import com.hedvig.android.design.system.hedvig.HedvigPreview
import com.hedvig.android.design.system.hedvig.HedvigText
import com.hedvig.android.design.system.hedvig.HedvigTheme
import com.hedvig.android.design.system.hedvig.HorizontalItemsWithMaximumSpaceTaken
Expand Down Expand Up @@ -87,7 +86,6 @@ internal fun SummaryDestination(
navigateUp: () -> Unit,
navigateBack: () -> Unit,
exitFlow: () -> Unit,
onNavigateToNewConversation: () -> Unit,
onNavigateToFinishedScreen: (LocalDate) -> Unit,
) {
val uiState = viewModel.uiState.collectAsStateWithLifecycle().value
Expand All @@ -101,7 +99,6 @@ internal fun SummaryDestination(
navigateUp = navigateUp,
navigateBack = navigateBack,
exitFlow = exitFlow,
onNavigateToNewConversation = onNavigateToNewConversation,
onConfirmChanges = { viewModel.emit(SummaryEvent.ConfirmChanges) },
onDismissSubmissionError = { viewModel.emit(SummaryEvent.DismissSubmissionError) },
)
Expand All @@ -113,7 +110,6 @@ private fun SummaryScreen(
navigateUp: () -> Unit,
navigateBack: () -> Unit,
exitFlow: () -> Unit,
onNavigateToNewConversation: () -> Unit,
onConfirmChanges: () -> Unit,
onDismissSubmissionError: () -> Unit,
) {
Expand Down Expand Up @@ -145,7 +141,6 @@ private fun SummaryScreen(
is Content -> {
SummaryScreen(
content = uiState,
onNavigateToNewConversation = onNavigateToNewConversation,
onConfirmChanges = onConfirmChanges,
onDismissSubmissionError = onDismissSubmissionError,
)
Expand All @@ -159,7 +154,6 @@ private fun SummaryScreen(
@Composable
private fun SummaryScreen(
content: SummaryUiState.Content,
onNavigateToNewConversation: () -> Unit,
onConfirmChanges: () -> Unit,
onDismissSubmissionError: () -> Unit,
) {
Expand Down Expand Up @@ -206,27 +200,6 @@ private fun SummaryScreen(
}
Spacer(Modifier.height(16.dp))
HedvigNotificationCard(stringResource(R.string.CHANGE_ADDRESS_OTHER_INSURANCES_INFO_TEXT), Info)
Spacer(Modifier.height(40.dp))
QuestionsAndAnswers()
Spacer(Modifier.height(40.dp))
Column {
HedvigText(
text = stringResource(R.string.SUBMIT_CLAIM_NEED_HELP_TITLE),
modifier = Modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.CenterHorizontally),
)
Spacer(Modifier.height(12.dp))
HedvigButton(
text = stringResource(R.string.open_chat),
enabled = true,
onClick = onNavigateToNewConversation,
buttonSize = Small,
modifier = Modifier
.fillMaxWidth()
.wrapContentWidth(Alignment.CenterHorizontally),
)
}
Spacer(Modifier.height(16.dp))
with(LocalDensity.current) {
Spacer(Modifier.height(bottomAttachedContentHeightPx.toDp()))
Expand Down Expand Up @@ -369,7 +342,7 @@ private fun QuestionsAndAnswers(modifier: Modifier = Modifier) {
}
}

@HedvigPreview
@HedvigMultiScreenPreview
@Preview(device = "spec:width=1080px,height=3800px,dpi=440")
@Composable
private fun PreviewSummaryScreen(
Expand All @@ -382,7 +355,6 @@ private fun PreviewSummaryScreen(
navigateUp = {},
navigateBack = {},
exitFlow = {},
onNavigateToNewConversation = {},
onConfirmChanges = {},
onDismissSubmissionError = {},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private fun DeflectIdProtectionScreen(
Column {
Spacer(Modifier.height(16.dp))
HedvigText(
text = stringResource(R.string.HC_CHAT_QUESTION),
text = stringResource(R.string.SUBMIT_CLAIM_NEED_HELP_TITLE),
textAlign = TextAlign.Center,
modifier = sideSpacingModifier.fillMaxWidth(),
)
Expand Down

0 comments on commit b53fae5

Please sign in to comment.