From bb4bfdabd896ed61061d28ab303458d4ae7e45cf Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Tue, 24 Jan 2023 13:38:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E7=BD=AE=E9=A1=B6?= =?UTF-8?q?=E8=B4=B4=E6=A0=87=E9=A2=98=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../post/ui/page/forum/threadlist/ForumThreadListPage.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/forum/threadlist/ForumThreadListPage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/forum/threadlist/ForumThreadListPage.kt index 35a44f4b..5ff56a30 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/forum/threadlist/ForumThreadListPage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/forum/threadlist/ForumThreadListPage.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.huanchengfly.tieba.post.R import com.huanchengfly.tieba.post.activities.ThreadActivity +import com.huanchengfly.tieba.post.api.abstractText import com.huanchengfly.tieba.post.arch.BaseComposeActivity.Companion.LocalWindowSizeClass import com.huanchengfly.tieba.post.arch.collectPartialAsState import com.huanchengfly.tieba.post.arch.pageViewModel @@ -280,8 +281,12 @@ fun ForumThreadListPage( size = Sizes.Small, contentDescription = item.author?.name ) + var title = item.title + if (title.isBlank()) { + title = item.abstractText + } Text( - text = item.title, + text = title, style = MaterialTheme.typography.subtitle1, maxLines = 1, overflow = TextOverflow.Ellipsis,