diff --git a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/main/explore/ExplorePage.kt b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/main/explore/ExplorePage.kt index ceb3fa25..ea328c3e 100644 --- a/app/src/main/java/com/huanchengfly/tieba/post/ui/page/main/explore/ExplorePage.kt +++ b/app/src/main/java/com/huanchengfly/tieba/post/ui/page/main/explore/ExplorePage.kt @@ -30,17 +30,19 @@ import com.huanchengfly.tieba.post.ui.widgets.compose.ActionItem import com.huanchengfly.tieba.post.ui.widgets.compose.PagerTabIndicator import com.huanchengfly.tieba.post.ui.widgets.compose.Toolbar import com.huanchengfly.tieba.post.ui.widgets.compose.accountNavIconIfCompact +import com.huanchengfly.tieba.post.utils.AccountUtil.LocalAccount import kotlinx.coroutines.launch @OptIn(ExperimentalPagerApi::class) @Composable fun ExplorePage() { + val account = LocalAccount.current val context = LocalContext.current - val pages = listOf Unit)>>( - stringResource(id = R.string.title_concern) to @Composable { + val pages = listOfNotNull Unit)>>( + if (account != null) stringResource(id = R.string.title_concern) to @Composable { ConcernPage() - }, + } else null, stringResource(id = R.string.title_personalized) to @Composable { PersonalizedPage() },