fix: 搜索用户无法打开个人主页
This commit is contained in:
parent
7bb2e38e7e
commit
a8fa7c71fa
|
|
@ -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
|
||||
|
|
@ -142,14 +143,20 @@ fun SearchUserPage(
|
|||
)
|
||||
}
|
||||
}
|
||||
exactMatch?.let {
|
||||
item(key = "ExactMatch") {
|
||||
SearchUserItem(
|
||||
item = exactMatch!!,
|
||||
item = it,
|
||||
onClick = {
|
||||
val id = it.id?.toLongOrNull()
|
||||
if (id != null) {
|
||||
navigator.navigate(UserProfilePageDestination(id))
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showFuzzyMatchResult) {
|
||||
stickyHeader(key = "FuzzyMatchHeader") {
|
||||
Column(
|
||||
|
|
@ -168,6 +175,10 @@ fun SearchUserPage(
|
|||
SearchUserItem(
|
||||
item = it,
|
||||
onClick = {
|
||||
val id = it.id?.toLongOrNull()
|
||||
if (id != null) {
|
||||
navigator.navigate(UserProfilePageDestination(id))
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue