Refactor: 个人主页UI及智能体列表功能调整
- **个人主页UI调整:**
- "编辑个人资料"按钮样式调整为与"私信"按钮一致。
- "关注"按钮样式调整为渐变色,"已关注"状态下显示灰色边框。
- "私信"按钮样式调整为灰色背景。
- "帖子"、"粉丝"、"关注"文案调整。
- 个人主页背景色适配深色模式。
- 个人主页内容切换Tab图标化,并添加下划线指示器。
- **智能体列表功能:**
- 新增`UserAgentsList.kt`用于展示用户的智能体列表。
- 在个人主页中集成智能体列表展示(新的Tab页)。
- 调整`UserAgentsRow`组件,使其能够加载并展示当前用户或其他用户的智能体,并添加"更多"按钮。
- `MyProfileViewModel`中增加对智能体数据的加载和管理。
- `UserAgentsViewModel`调整为可以加载指定用户或当前用户的智能体数据。
- **其他:**
- `Colors.kt`中新增`profileBackground`颜色定义。
- `Agent.kt`中调整了`getAgent`方法返回类型。
This commit is contained in:
@@ -2,8 +2,10 @@ package com.aiosman.ravenow.entity
|
||||
|
||||
import androidx.paging.PagingSource
|
||||
import androidx.paging.PagingState
|
||||
import com.aiosman.ravenow.data.Agent
|
||||
import com.aiosman.ravenow.data.ListContainer
|
||||
import com.aiosman.ravenow.data.AgentService
|
||||
import com.aiosman.ravenow.data.DataContainer
|
||||
import com.aiosman.ravenow.data.MomentService
|
||||
import com.aiosman.ravenow.data.ServiceException
|
||||
import com.aiosman.ravenow.data.UploadImage
|
||||
@@ -196,7 +198,7 @@ class AgentLoader : DataLoader<AgentEntity,AgentLoaderExtraArgs>() {
|
||||
|
||||
return if (extra.authorId != null) {
|
||||
// getAgent 返回 DataContainer<ListContainer<Agent>>
|
||||
val dataContainer = body as com.aiosman.ravenow.data.DataContainer<com.aiosman.ravenow.data.ListContainer<com.aiosman.ravenow.data.Agent>>
|
||||
val dataContainer = body as DataContainer<ListContainer<Agent>>
|
||||
val listContainer = dataContainer.data
|
||||
ListContainer(
|
||||
list = listContainer.list.map { it.toAgentEntity()},
|
||||
|
||||
Reference in New Issue
Block a user