From 3f9cd49d71f5d179db10dc9ae8a4c6a5af8a22f9 Mon Sep 17 00:00:00 2001 From: Tlaster Date: Mon, 22 Sep 2025 16:41:24 +0900 Subject: [PATCH] fix vvo comment full text --- .../flare/data/network/vvo/model/TimelineData.kt | 2 ++ .../kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/dev/dimension/flare/data/network/vvo/model/TimelineData.kt b/shared/src/commonMain/kotlin/dev/dimension/flare/data/network/vvo/model/TimelineData.kt index 3fb268dcd..1b5130939 100644 --- a/shared/src/commonMain/kotlin/dev/dimension/flare/data/network/vvo/model/TimelineData.kt +++ b/shared/src/commonMain/kotlin/dev/dimension/flare/data/network/vvo/model/TimelineData.kt @@ -583,6 +583,8 @@ internal data class Comment( val analysis_extra: String? = null, @SerialName("total_number") val totalNumber: Long? = null, + @SerialName("associate_status_id") + val associateStatusID: String? = null, ) { val commentList: List? get() = diff --git a/shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt b/shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt index 157c55aa0..c48a00444 100644 --- a/shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt +++ b/shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt @@ -559,7 +559,16 @@ private fun replaceMentionAndHashtag( if (node is Element) { val href = node.attribute("href")?.value if (href != null) { - if (href.startsWith("/n/")) { + if (href.all { it.isDigit() }) { + val statusId = href + node.attributes().put( + "href", + AppDeepLink.VVO.StatusDetail( + accountKey = accountKey, + statusKey = MicroBlogKey(statusId, accountKey.host), + ), + ) + } else if (href.startsWith("/n/")) { val id = href.removePrefix("/n/") if (id.isNotEmpty()) { node.attributes().put(