From 477ebaa79693b4370c820fd0a6cbb8705b9928d1 Mon Sep 17 00:00:00 2001 From: Alberto Puebla Date: Wed, 13 May 2026 01:16:36 -0400 Subject: [PATCH 1/2] Show build dates under release build numbers --- .../grapheneos/info/ui/releases/Changelog.kt | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt b/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt index 50f91f2..f924d89 100644 --- a/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt +++ b/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt @@ -29,6 +29,11 @@ import org.w3c.dom.Document import org.w3c.dom.Node import org.xml.sax.InputSource import java.io.StringReader +import java.time.LocalDate +import java.time.format.DateTimeFormatter +import java.time.format.DateTimeParseException +import java.time.format.FormatStyle +import java.util.Locale import javax.xml.parsers.DocumentBuilderFactory @Composable @@ -151,18 +156,36 @@ private fun ParseChildren( val annotatedString = annotatedStringBuilder.toAnnotatedString() - ClickableText( - text = annotatedString, - modifier = modifier.semantics { heading() }, - onClick = { offset -> - annotatedString - .getStringAnnotations("URL", offset, offset).firstOrNull() - ?.let { annotation -> - localUriHandler.openUri(annotation.item) - } - }, - style = typography.titleLarge, - ) + val buildDate = try { + LocalDate.parse( + annotatedString.text.take(8), + DateTimeFormatter.ofPattern("yyyyMMdd", Locale.ROOT) + ) + } catch (_: DateTimeParseException) { + null + } + + Column { + ClickableText( + text = annotatedString, + modifier = modifier.semantics { heading() }, + onClick = { offset -> + annotatedString + .getStringAnnotations("URL", offset, offset).firstOrNull() + ?.let { annotation -> + localUriHandler.openUri(annotation.item) + } + }, + style = typography.titleLarge, + ) + buildDate?.let { + Text( + text = it.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)), + style = typography.titleSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + } + } } "content" -> NodeToComposable( From 0258bcfc48a413f61d9df4d830dbd85f8e78b1ae Mon Sep 17 00:00:00 2001 From: Alberto Puebla Date: Fri, 22 May 2026 15:32:45 -0400 Subject: [PATCH 2/2] Indicate build dates are in UTC --- .../main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt b/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt index f924d89..1a6363b 100644 --- a/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt +++ b/app/src/main/kotlin/app/grapheneos/info/ui/releases/Changelog.kt @@ -180,7 +180,7 @@ private fun ParseChildren( ) buildDate?.let { Text( - text = it.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)), + text = it.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)) + " (UTC)", style = typography.titleSmall, color = MaterialTheme.colorScheme.onSurfaceVariant )