Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06d6709d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix back arrow behavior for remote-only sign-in flow" into udc-dev am: 3130e82a

parents 7fb02e04 3130e82a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -232,6 +232,14 @@ class CredentialSelectorViewModel(
        )
    }

    fun getFlowOnBackToHybridSnackBarScreen() {
        uiState = uiState.copy(
            getCredentialUiState = uiState.getCredentialUiState?.copy(
                currentScreenState = GetScreenState.REMOTE_ONLY
            )
        )
    }

    fun getFlowOnBackToPrimarySelectionScreen() {
        uiState = uiState.copy(
            getCredentialUiState = uiState.getCredentialUiState?.copy(
+4 −4
Original line number Diff line number Diff line
@@ -121,9 +121,10 @@ fun GetCredentialScreen(
                                providerDisplayInfo = getCredentialUiState.providerDisplayInfo,
                                onEntrySelected = viewModel::getFlowOnEntrySelected,
                                onBackButtonClicked =
                                viewModel::getFlowOnBackToPrimarySelectionScreen,
                                if (getCredentialUiState.isNoAccount)
                                    viewModel::getFlowOnBackToHybridSnackBarScreen
                                else viewModel::getFlowOnBackToPrimarySelectionScreen,
                                onCancel = viewModel::onUserCancel,
                                isNoAccount = getCredentialUiState.isNoAccount,
                                onLog = { viewModel.logUiEvent(it) },
                            )
                            viewModel.uiMetrics.log(GetCredentialEvent
@@ -327,7 +328,6 @@ fun AllSignInOptionCard(
    onEntrySelected: (BaseEntry) -> Unit,
    onBackButtonClicked: () -> Unit,
    onCancel: () -> Unit,
    isNoAccount: Boolean,
    onLog: @Composable (UiEventEnum) -> Unit,
) {
    val sortedUserNameToCredentialEntryList =
@@ -336,7 +336,7 @@ fun AllSignInOptionCard(
    SheetContainerCard(topAppBar = {
        MoreOptionTopAppBar(
            text = stringResource(R.string.get_dialog_title_sign_in_options),
            onNavigationIconClicked = if (isNoAccount) onCancel else onBackButtonClicked,
            onNavigationIconClicked = onBackButtonClicked,
            bottomPadding = 0.dp,
        )
    }) {