mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-12 08:42:25 +01:00
Notification access asks calmly in the car and points to the phone for when you're parked
This commit is contained in:
1 parent
62facda5d9
commit
564bf005c7
19 files changed
+10
-25
No files matched your search
@@ -97,7 +97,8 @@ fun NotificationsSection() {
|
||||
}
|
||||
}
|
||||
|
||||
if (history.isEmpty()) {
|
||||
// With access off, "nothing yet" would promise notifications that can't come.
|
||||
if (history.isEmpty() && listening) {
|
||||
Text(
|
||||
stringResource(R.string.notif_empty),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
@@ -113,10 +114,11 @@ fun NotificationsSection() {
|
||||
|
||||
@Composable
|
||||
internal fun AccessBanner(onOpen: () -> Unit) {
|
||||
// A setting left off, not a fault: a quiet card, as Android Auto shows one, rather than red.
|
||||
Surface(
|
||||
shape = MaterialTheme.shapes.large,
|
||||
color = MaterialTheme.colorScheme.errorContainer,
|
||||
contentColor = MaterialTheme.colorScheme.onErrorContainer,
|
||||
color = MaterialTheme.colorScheme.surfaceContainerHigh,
|
||||
contentColor = MaterialTheme.colorScheme.onSurface,
|
||||
modifier = Modifier.fillMaxWidth().padding(vertical = 8.dp),
|
||||
) {
|
||||
Row(
|
||||
@@ -124,13 +126,13 @@ internal fun AccessBanner(onOpen: () -> Unit) {
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||
) {
|
||||
Icon(Icons.Filled.Warning, contentDescription = null)
|
||||
Icon(Icons.Filled.Notifications, contentDescription = null, tint = MaterialTheme.colorScheme.primary)
|
||||
Text(
|
||||
stringResource(R.string.notif_off),
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
modifier = Modifier.weight(1f),
|
||||
)
|
||||
GsButton(onClick = onOpen) { Text(stringResource(R.string.guide_open)) }
|
||||
GsButton(onClick = onOpen, tone = GsTone.Tonal) { Text(stringResource(R.string.allow_on_phone)) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user