feat: 贴子页面标题点击进吧
This commit is contained in:
parent
c4f9ad8718
commit
3928df1132
|
|
@ -110,6 +110,7 @@ import com.huanchengfly.tieba.post.toastShort
|
||||||
import com.huanchengfly.tieba.post.ui.common.PbContentRender
|
import com.huanchengfly.tieba.post.ui.common.PbContentRender
|
||||||
import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme
|
import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme
|
||||||
import com.huanchengfly.tieba.post.ui.page.ProvideNavigator
|
import com.huanchengfly.tieba.post.ui.page.ProvideNavigator
|
||||||
|
import com.huanchengfly.tieba.post.ui.page.destinations.ForumPageDestination
|
||||||
import com.huanchengfly.tieba.post.ui.widgets.compose.Avatar
|
import com.huanchengfly.tieba.post.ui.widgets.compose.Avatar
|
||||||
import com.huanchengfly.tieba.post.ui.widgets.compose.BackNavigationIcon
|
import com.huanchengfly.tieba.post.ui.widgets.compose.BackNavigationIcon
|
||||||
import com.huanchengfly.tieba.post.ui.widgets.compose.Button
|
import com.huanchengfly.tieba.post.ui.widgets.compose.Button
|
||||||
|
|
@ -816,6 +817,14 @@ fun ThreadPage(
|
||||||
TopBar(
|
TopBar(
|
||||||
forum = forum,
|
forum = forum,
|
||||||
onBack = { navigator.navigateUp() },
|
onBack = { navigator.navigateUp() },
|
||||||
|
onForumClick = {
|
||||||
|
val forumName = forum?.get { name }
|
||||||
|
if (forumName != null) navigator.navigate(
|
||||||
|
ForumPageDestination(
|
||||||
|
forumName
|
||||||
|
)
|
||||||
|
)
|
||||||
|
},
|
||||||
modifier = Modifier.statusBarsPadding()
|
modifier = Modifier.statusBarsPadding()
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
@ -1076,6 +1085,7 @@ fun ThreadPage(
|
||||||
private fun TopBar(
|
private fun TopBar(
|
||||||
forum: ImmutableHolder<SimpleForum>?,
|
forum: ImmutableHolder<SimpleForum>?,
|
||||||
onBack: () -> Unit,
|
onBack: () -> Unit,
|
||||||
|
onForumClick: () -> Unit,
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
TitleCentredToolbar(
|
TitleCentredToolbar(
|
||||||
|
|
@ -1087,6 +1097,7 @@ private fun TopBar(
|
||||||
.height(IntrinsicSize.Min)
|
.height(IntrinsicSize.Min)
|
||||||
.clip(RoundedCornerShape(100))
|
.clip(RoundedCornerShape(100))
|
||||||
.background(ExtendedTheme.colors.chip)
|
.background(ExtendedTheme.colors.chip)
|
||||||
|
.clickable(onClick = onForumClick)
|
||||||
.padding(4.dp),
|
.padding(4.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue