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 a8fa7c7 commit 9382e30
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ object PbPageRepository {
}
val userList = response.data_.user_list
val postList = response.data_.post_list.map {
val author = it.author
?: userList.first { user -> user.id == it.author_id }
it.copy(
author_id = author.id,
author = it.author
?: userList.first { user -> user.id == it.author_id },
from_forum = response.data_.forum,
Expand All @@ -81,6 +84,7 @@ object PbPageRepository {
}
val firstPost = postList.firstOrNull { it.floor == 1 }
?: response.data_.first_floor_post?.copy(
author_id = response.data_.thread.author.id,
author = response.data_.thread.author,
from_forum = response.data_.forum,
tid = response.data_.thread.id,
Expand Down

0 comments on commit 9382e30

Please sign in to comment.