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

Commit 7eb4cfc4 authored by Helen Qin's avatar Helen Qin
Browse files

Split the cred entry line of "[displayName] • [credential type] • [provider name]"

New entry design:
- line 1: affiliated domain, if exists
- line 2: username (or displayname of passkey)
- line 3: displayname (or username of passkey), if exists
- line 4: credential type • provider name

Test: see screenshots in test
Bug: 328127325
Change-Id: I39765c4ced1f21e435eaea896fbf9c8acdeb5528
parent df61b513
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -152,14 +152,14 @@ fun Entry(
                                },
                            )
                        }
                    } else if (entrySecondLineText != null) {
                    } else if (!entrySecondLineText.isNullOrBlank()) {
                        BodySmallText(
                            text = entrySecondLineText,
                            enforceOneLine = enforceOneLine,
                            onTextLayout = onTextLayout,
                        )
                    }
                    if (entryThirdLineText != null) {
                    if (!entryThirdLineText.isNullOrBlank()) {
                        BodySmallText(
                            text = entryThirdLineText,
                            enforceOneLine = enforceOneLine,
+4 −4
Original line number Diff line number Diff line
@@ -786,16 +786,16 @@ fun CredentialEntryRow(
        else if (credentialEntryInfo.icon == null) painterResource(R.drawable.ic_other_sign_in_24)
        else null,
        entryHeadlineText = username,
        entrySecondLineText =
        entrySecondLineText = displayName,
        entryThirdLineText =
        (if (hasSingleEntry != null && hasSingleEntry)
            if (credentialEntryInfo.credentialType == CredentialType.PASSKEY ||
                    credentialEntryInfo.credentialType == CredentialType.PASSWORD)
                listOf(displayName)
                emptyList()
            // Still show the type display name for all non-password/passkey types since it won't be
            // mentioned in the bottom sheet heading.
            else listOf(displayName, credentialEntryInfo.credentialTypeDisplayName)
            else listOf(credentialEntryInfo.credentialTypeDisplayName)
        else listOf(
                displayName,
                credentialEntryInfo.credentialTypeDisplayName,
                credentialEntryInfo.providerDisplayName
        )).filterNot(TextUtils::isEmpty).let { itemsToDisplay ->