From 2f1ab3b038e51f6a9140ec617bb4eef585ba32ad Mon Sep 17 00:00:00 2001 From: HuanCheng65 <22636177+HuanCheng65@users.noreply.github.com> Date: Mon, 17 Jul 2023 13:30:27 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E6=96=B0=E7=89=88=E8=B4=B4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/forum/threadlist/ForumThreadListPage.kt | 7 ++++++- .../post/ui/page/history/list/HistoryListPage.kt | 15 +++++++++------ .../post/ui/page/threadstore/ThreadStorePage.kt | 8 -------- 3 files changed, 15 insertions(+), 15 deletions(-) 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 6e74cf4c..968ed497 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 @@ -335,7 +335,12 @@ fun ForumThreadListPage( goodClassifyId = goodClassifyId, goodClassifyHoldersProvider = { goodClassifies }, onItemClicked = { - navigator.navigate(ThreadPageDestination(it.threadId)) + navigator.navigate( + ThreadPageDestination( + it.threadId, + threadInfo = it + ) + ) }, onAgree = { viewModel.send( diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/history/list/HistoryListPage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/history/list/HistoryListPage.kt index d7ec6c67..eed96774 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/history/list/HistoryListPage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/history/list/HistoryListPage.kt @@ -32,6 +32,8 @@ import com.huanchengfly.tieba.post.models.database.History import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme import com.huanchengfly.tieba.post.ui.page.LocalNavigator import com.huanchengfly.tieba.post.ui.page.destinations.ForumPageDestination +import com.huanchengfly.tieba.post.ui.page.destinations.ThreadPageDestination +import com.huanchengfly.tieba.post.ui.page.thread.ThreadPageFrom import com.huanchengfly.tieba.post.ui.widgets.Chip import com.huanchengfly.tieba.post.ui.widgets.compose.Avatar import com.huanchengfly.tieba.post.ui.widgets.compose.LazyLoad @@ -144,12 +146,13 @@ fun HistoryListPage( HistoryUtil.TYPE_THREAD -> { val extra = if (it.extras != null) it.extras.fromJson() else null - ThreadActivity.launch( - context, - it.data, - extra?.pid, - extra?.isSeeLz, - ThreadActivity.FROM_HISTORY + navigator.navigate( + ThreadPageDestination( + it.data.toLong(), + postId = extra?.pid?.toLongOrNull() ?: 0L, + seeLz = extra?.isSeeLz ?: false, + from = ThreadPageFrom.FROM_HISTORY + ) ) } } diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/threadstore/ThreadStorePage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/threadstore/ThreadStorePage.kt index 236d860a..457d38c7 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/threadstore/ThreadStorePage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/threadstore/ThreadStorePage.kt @@ -183,14 +183,6 @@ fun ThreadStorePage( } }, onClick = { -// ThreadActivity.launch( -// context, -// info.threadId, -// info.markPid, -// context.appPreferences.collectThreadSeeLz, -// "collect", -// info.maxPid -// ) navigator.navigate( ThreadPageDestination( threadId = info.threadId.toLong(),