Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
fix: 搜索用户无法打开个人主页
Browse files Browse the repository at this point in the history
  • Loading branch information
HuanCheng65 committed Feb 2, 2024
1 parent 7bb2e38 commit a8fa7c7
Showing 1 changed file with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.huanchengfly.tieba.post.arch.pageViewModel
import com.huanchengfly.tieba.post.ui.common.theme.compose.ExtendedTheme
import com.huanchengfly.tieba.post.ui.common.theme.compose.pullRefreshIndicator
import com.huanchengfly.tieba.post.ui.page.LocalNavigator
import com.huanchengfly.tieba.post.ui.page.destinations.UserProfilePageDestination
import com.huanchengfly.tieba.post.ui.page.search.SearchUiEvent
import com.huanchengfly.tieba.post.ui.widgets.compose.Avatar
import com.huanchengfly.tieba.post.ui.widgets.compose.Chip
Expand Down Expand Up @@ -142,12 +143,18 @@ fun SearchUserPage(
)
}
}
item(key = "ExactMatch") {
SearchUserItem(
item = exactMatch!!,
onClick = {
}
)
exactMatch?.let {
item(key = "ExactMatch") {
SearchUserItem(
item = it,
onClick = {
val id = it.id?.toLongOrNull()
if (id != null) {
navigator.navigate(UserProfilePageDestination(id))
}
}
)
}
}
}
if (showFuzzyMatchResult) {
Expand All @@ -168,6 +175,10 @@ fun SearchUserPage(
SearchUserItem(
item = it,
onClick = {
val id = it.id?.toLongOrNull()
if (id != null) {
navigator.navigate(UserProfilePageDestination(id))
}
}
)
}
Expand Down

0 comments on commit a8fa7c7

Please sign in to comment.