aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-04 11:27:13 +0100
committerDanilo M. <danix@danix.xyz>2026-11-04 11:27:13 +0100
commite573a321d982341f2940868cb80da8d1eccc6981 (patch)
tree0d8359ab62d4b3ad94df7275e128d15823491ea8 /app/src/main/java
parentdc15b927363c1c077cf9cb7453fa9df50406d4d3 (diff)
downloadHardenedPass-e573a321d982341f2940868cb80da8d1eccc6981.tar.gz
HardenedPass-e573a321d982341f2940868cb80da8d1eccc6981.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/ui/autofill/PublisherChangedScreen.kt16
1 files changed, 10 insertions, 6 deletions
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 <b> 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 <b> 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))
+ }
}
}
}