feat: 实现探索动态功能

在动态列表中新增探索动态功能,允许用户浏览和发现新的动态内容。

具体修改包括:

- 在API接口中添加`explore`参数,用于请求探索动态数据。
- 修改MomentService,添加`explore`参数,用于获取探索动态数据。
- 更新MomentViewModel,使用`explore`参数请求探索动态数据。
- 修改MomentPagingSource,使用`explore`参数请求探索动态数据。
- 修改MomentCard,使用`explore`参数显示探索动态数据。
This commit is contained in:
2024-10-26 17:17:29 +08:00
parent 5c1cca6a69
commit fe2bd2f382
5 changed files with 16 additions and 5 deletions

View File

@@ -121,6 +121,7 @@ interface MomentService {
* @param timelineId 用户时间线ID,指定用户 ID 的时间线
* @param contentSearch 内容搜索,过滤条件
* @param trend 是否趋势动态
* @param explore 是否探索动态
* @return 动态列表
*/
suspend fun getMoments(
@@ -129,6 +130,7 @@ interface MomentService {
timelineId: Int? = null,
contentSearch: String? = null,
trend: Boolean? = false,
explore: Boolean? = false,
favoriteUserId: Int? = null
): ListContainer<MomentEntity>