fix: 点赞状态更新后不重组
This commit is contained in:
parent
e711e6e4df
commit
2d52b45ec1
|
|
@ -119,7 +119,7 @@ fun UserLikeForumPage(
|
|||
lazyListState = lazyListState
|
||||
) {
|
||||
UserLikeForumList(
|
||||
forums = { forums },
|
||||
data = forums,
|
||||
onClickForum = { forumBean ->
|
||||
forumBean.name?.let {
|
||||
navigator.navigate(ForumPageDestination(it))
|
||||
|
|
@ -142,11 +142,10 @@ fun UserLikeForumPage(
|
|||
|
||||
@Composable
|
||||
private fun UserLikeForumList(
|
||||
forums: () -> ImmutableList<UserLikeForumBean.ForumBean>,
|
||||
data: ImmutableList<UserLikeForumBean.ForumBean>,
|
||||
onClickForum: (UserLikeForumBean.ForumBean) -> Unit,
|
||||
lazyListState: LazyListState = rememberLazyListState(),
|
||||
) {
|
||||
val data = remember(forums) { forums() }
|
||||
MyLazyColumn(state = lazyListState) {
|
||||
items(
|
||||
items = data,
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ fun UserPostPage(
|
|||
lazyListState = lazyListState
|
||||
) {
|
||||
UserPostList(
|
||||
posts = { posts },
|
||||
data = posts,
|
||||
lazyListState = lazyListState,
|
||||
onClickItem = {
|
||||
navigator.navigate(
|
||||
|
|
@ -262,7 +262,7 @@ fun UserPostPage(
|
|||
|
||||
@Composable
|
||||
private fun UserPostList(
|
||||
posts: () -> ImmutableList<ImmutableHolder<PostInfoList>>,
|
||||
data: ImmutableList<ImmutableHolder<PostInfoList>>,
|
||||
lazyListState: LazyListState = rememberLazyListState(),
|
||||
onClickItem: (PostInfoList) -> Unit = {},
|
||||
onAgreeItem: (PostInfoList) -> Unit = {},
|
||||
|
|
@ -271,7 +271,6 @@ private fun UserPostList(
|
|||
onClickForum: (name: String) -> Unit = {},
|
||||
onClickOriginThread: (OriginThreadInfo) -> Unit = {},
|
||||
) {
|
||||
val data = remember(posts) { posts() }
|
||||
MyLazyColumn(state = lazyListState) {
|
||||
items(
|
||||
items = data,
|
||||
|
|
|
|||
Loading…
Reference in New Issue