mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 11:28:22 +00:00
Fix event date shown as Jan 1970 in Show Details modals
Event createdAt is a Nostr timestamp in seconds, but TimeUtils.formatLongToCustomDateTimeWithSeconds expects milliseconds (Instant.ofEpochMilli), so the date always rendered as Jan 21, 1970. Convert to milliseconds at the call sites, matching how ActivitiesScreen and ApplicationsScreen already handle it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RGJT3Vb91p82TwmDZxqGem
This commit is contained in:
+1
-1
@@ -97,7 +97,7 @@ fun EncryptDecryptDetailModal(
|
||||
)
|
||||
EventSection(
|
||||
stringResource(R.string.date),
|
||||
TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt),
|
||||
TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt * 1000),
|
||||
{ copyToClipboard(clipboard, "${event.createdAt}") },
|
||||
)
|
||||
if (event.content.isNotEmpty()) {
|
||||
|
||||
@@ -110,7 +110,7 @@ fun EventDetailModal(
|
||||
)
|
||||
EventSection(
|
||||
stringResource(R.string.date),
|
||||
TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt),
|
||||
TimeUtils.formatLongToCustomDateTimeWithSeconds(event.createdAt * 1000),
|
||||
{
|
||||
copyToClipboard(clipboard, "${event.createdAt}")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user