From e573a321d982341f2940868cb80da8d1eccc6981 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 4 Nov 2026 11:27:13 +0100 Subject: fix(app): keep a double tap from re-enabling autofill The Re-enable button replaced Advanced information in place, so a quick double tap re-enabled autofill for an app with a changed publisher (upstream had the same flaw). The package and certificate details now come first and push Re-enable below them. The title is marked as a heading and the footer's ponytail note sits on the footer. Co-Authored-By: Claude Opus 5.5 --- .../passwordstore/ui/autofill/PublisherChangedScreen.kt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/app/passwordstore/ui/autofill/PublisherChangedScreen.kt b/app/src/main/java/app/passwordstore/ui/autofill/PublisherChangedScreen.kt index 8c210b79..6287408e 100644 --- a/app/src/main/java/app/passwordstore/ui/autofill/PublisherChangedScreen.kt +++ b/app/src/main/java/app/passwordstore/ui/autofill/PublisherChangedScreen.kt @@ -28,6 +28,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.semantics.heading +import androidx.compose.ui.semantics.semantics import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.unit.dp @@ -65,11 +67,9 @@ fun PublisherChangedScreen( modifier = Modifier.size(40.dp), tint = MaterialTheme.colorScheme.error, ) - // ponytail: stringResource drops the footer's in every locale but Italian (whose footer - // has none); the red title carries the emphasis. Keep spans with getText if it is missed. Text( stringResource(R.string.oreo_autofill_warning_publisher_dataset_title), - modifier = center, + modifier = center.semantics { heading() }, color = MaterialTheme.colorScheme.error, textAlign = TextAlign.Center, style = MaterialTheme.typography.titleLarge, @@ -90,6 +90,8 @@ fun PublisherChangedScreen( textAlign = TextAlign.Center, style = MaterialTheme.typography.bodySmall, ) + // ponytail: stringResource drops the footer's in every locale but Italian (whose footer + // has none); the red title carries the emphasis. Keep spans with getText if it is missed. Text( stringResource(R.string.oreo_autofill_warning_publisher_footer), style = MaterialTheme.typography.bodyMedium, @@ -104,9 +106,8 @@ fun PublisherChangedScreen( Text(stringResource(R.string.oreo_autofill_warning_publisher_advanced_info_button)) } } else { - OutlinedButton(onClick = onReset, modifier = center) { - Text(stringResource(R.string.oreo_autofill_warning_publisher_reenable_button)) - } + // The details come first, so Re-enable never sits where Advanced information was and a + // double tap cannot re-enable autofill. SelectionContainer { Text( details, @@ -115,6 +116,9 @@ fun PublisherChangedScreen( style = MaterialTheme.typography.bodySmall.copy(fontFamily = FontFamily.Monospace), ) } + OutlinedButton(onClick = onReset, modifier = center) { + Text(stringResource(R.string.oreo_autofill_warning_publisher_reenable_button)) + } } } } -- cgit v1.2.3