新增关注和粉丝列表

- 新增关注和粉丝列表页面
- 新增关注和粉丝列表ViewModel
- 更新UserService以支持获取关注和粉丝列表

- 更新RiderProAPI以支持获取关注和粉丝列表
- 更新Profile页面以支持跳转到关注和粉丝列表页面
- 更新Navi以支持关注和粉丝列表页面导航
- 更新UserInformationFollowers和UserInformationFollowing以支持跳转到关注和粉丝列表页面
- 更新MyProfileViewModel
以支持更新用户资料横幅
This commit is contained in:
2024-09-06 01:55:12 +08:00
parent 37dcd19227
commit e936f9cb77
12 changed files with 412 additions and 46 deletions

View File

@@ -10,14 +10,18 @@ import java.io.IOException
*/
class AccountPagingSource(
private val userService: UserService,
private val nickname: String? = null
private val nickname: String? = null,
private val followerId: Int? = null,
private val followingId: Int? = null
) : PagingSource<Int, AccountProfileEntity>() {
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, AccountProfileEntity> {
return try {
val currentPage = params.key ?: 1
val users = userService.getUsers(
page = currentPage,
nickname = nickname
nickname = nickname,
followerId = followerId,
followingId = followingId
)
LoadResult.Page(
data = users.list,