Skip to content

Commit 3f9cd49

Browse files
committed
fix vvo comment full text
1 parent b1f1496 commit 3f9cd49

File tree

2 files changed

+12
-1
lines changed
  • shared/src/commonMain/kotlin/dev/dimension/flare

2 files changed

+12
-1
lines changed

shared/src/commonMain/kotlin/dev/dimension/flare/data/network/vvo/model/TimelineData.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ internal data class Comment(
583583
val analysis_extra: String? = null,
584584
@SerialName("total_number")
585585
val totalNumber: Long? = null,
586+
@SerialName("associate_status_id")
587+
val associateStatusID: String? = null,
586588
) {
587589
val commentList: List<Comment>?
588590
get() =

shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/VVO.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,16 @@ private fun replaceMentionAndHashtag(
559559
if (node is Element) {
560560
val href = node.attribute("href")?.value
561561
if (href != null) {
562-
if (href.startsWith("/n/")) {
562+
if (href.all { it.isDigit() }) {
563+
val statusId = href
564+
node.attributes().put(
565+
"href",
566+
AppDeepLink.VVO.StatusDetail(
567+
accountKey = accountKey,
568+
statusKey = MicroBlogKey(statusId, accountKey.host),
569+
),
570+
)
571+
} else if (href.startsWith("/n/")) {
563572
val id = href.removePrefix("/n/")
564573
if (id.isNotEmpty()) {
565574
node.attributes().put(

0 commit comments

Comments
 (0)