diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt index 58d280cf..1d6e41c4 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/comments/CommentsPageImpl.kt @@ -225,7 +225,7 @@ private fun CommentEntry( commenterName = comment.user, score = comment.score, createdAt = comment.createdAt, - updatedAt = comment.updatedAt, + lastEditedAt = comment.lastEditedAt, nameColorOverride = if (commentNode.isPostAuthor) MaterialTheme.colorScheme.tertiary else null, ), @@ -247,7 +247,7 @@ private fun buildCommenterString( commenterName: String, score: Int, createdAt: TemporalAccessor, - updatedAt: TemporalAccessor, + lastEditedAt: TemporalAccessor, nameColorOverride: Color? = null, ): AnnotatedString { val now = System.currentTimeMillis() @@ -257,9 +257,9 @@ private fun buildCommenterString( now, DateUtils.MINUTE_IN_MILLIS, ) - val updatedRelative = + val lastEditedRelative = DateUtils.getRelativeTimeSpanString( - Instant.from(updatedAt).toEpochMilli(), + Instant.from(lastEditedAt).toEpochMilli(), now, DateUtils.MINUTE_IN_MILLIS, ) @@ -277,12 +277,12 @@ private fun buildCommenterString( append('•') append(' ') append(createdRelative.toString()) - if (updatedRelative != createdRelative) { + if (lastEditedRelative != createdRelative) { append(' ') append('(') - append("Updated") + append("Edited") append(' ') - append(updatedRelative.toString()) + append(lastEditedRelative.toString()) append(')') } } diff --git a/model/src/main/kotlin/dev/msfjarvis/claw/model/Comment.kt b/model/src/main/kotlin/dev/msfjarvis/claw/model/Comment.kt index 54af384e..2fe4bf26 100644 --- a/model/src/main/kotlin/dev/msfjarvis/claw/model/Comment.kt +++ b/model/src/main/kotlin/dev/msfjarvis/claw/model/Comment.kt @@ -22,7 +22,7 @@ class Comment( val url: String, val score: Int, @Serializable(with = JavaInstantSerializer::class) val createdAt: TemporalAccessor, - @Serializable(with = JavaInstantSerializer::class) val updatedAt: TemporalAccessor, + @Serializable(with = JavaInstantSerializer::class) val lastEditedAt: TemporalAccessor, val parentComment: String?, @SerialName("commenting_user") val user: String, )