Commit Graph

368 Commits

Author SHA1 Message Date
0aa3069efe 调整im 登陆 2025-09-08 16:02:46 +08:00
b79073b295 优化 firebase 报错 2025-09-08 15:42:55 +08:00
1a41cb7aef 初步替换IM接口 2025-09-08 15:13:17 +08:00
1d632fb757 openim sdk 依赖及初始化 2025-09-08 12:10:38 +08:00
ef6fb6348f Merge branch 'main' of github.com-qq:Kevinlinpr/rider-pro-android-app 2025-09-05 16:52:10 +08:00
e61fb2ad79 修复无网崩溃 2025-09-05 16:51:27 +08:00
b4ed311978 增加加载异常处理 2025-09-05 16:42:34 +08:00
20ff6df3bf 暗黑模式下输入框为全白问题 2025-09-05 16:10:40 +08:00
18a0bb8494 动态详情页交互功能增加游客登录判断 2025-09-05 15:21:09 +08:00
9dceb99a98 群聊创建失败提示弹窗问题 2025-09-05 14:17:09 +08:00
9f14b35847 防抖调整 2025-09-04 18:28:11 +08:00
9b7349a761 暗黑模式下创建群聊界面不显示置灰状态的创建群聊按钮问题;输入框光标颜色 2025-09-04 14:23:15 +08:00
23f3baf238 Merge remote-tracking branch 'upstream/main' 2025-09-03 18:39:42 +08:00
1f1101e260 动态输入评论UI调整 2025-09-03 18:38:11 +08:00
ca9f4a372b Merge remote-tracking branch 'origin/main' 2025-09-03 18:07:59 +08:00
d93373d8fa Refactor: Add debounce for navigation and optimize comments loading
- Implemented debounced navigation to prevent multiple rapid navigations.
- Replaced Pager-based comment loading with a simpler list-based approach for improved performance and reduced complexity.
- Added loading and error states for comment fetching.
- Introduced `debouncedClickable` modifier for handling click events with debounce.
- Updated image viewer to use simple navigation arrows instead of HorizontalPager for better user experience.
- Added a new string resource for password length error.
2025-09-03 18:07:44 +08:00
ae7254163a Refactor: Add debounce for navigation and optimize comments loading
- Implemented debounced navigation to prevent multiple rapid navigations.
- Replaced Pager-based comment loading with a simpler list-based approach for improved performance and reduced complexity.
- Added loading and error states for comment fetching.
- Introduced `debouncedClickable` modifier for handling click events with debounce.
- Updated image viewer to use simple navigation arrows instead of HorizontalPager for better user experience.
- Added a new string resource for password length error.
2025-09-03 18:02:39 +08:00
e49e509c38 暗黑模式缺省图;UI调整 2025-09-03 17:37:52 +08:00
d703b5ae05 Refactor: Add debounce for navigation and optimize comments loading
- Implemented debounced navigation to prevent multiple rapid navigations.
- Replaced Pager-based comment loading with a simpler list-based approach for improved performance and reduced complexity.
- Added loading and error states for comment fetching.
- Introduced `debouncedClickable` modifier for handling click events with debounce.
- Updated image viewer to use simple navigation arrows instead of HorizontalPager for better user experience.
- Added a new string resource for password length error.
2025-09-03 16:03:57 +08:00
824be5fad8 图片添加加载效果
- 为AsyncImage添加了Shimmer加载效果
- 优化了热门动态的加载逻辑
- 统一了ViewModel的重置方法名
2025-09-03 14:59:47 +08:00
79547de2db 账户编辑、评论点赞功能优化和UI调整
**功能优化:**

*   **账户编辑:**
    *   昵称和个人简介输入时自动去除换行符。
    *   修复了进入编辑页面时可能未正确加载或重置用户资料的问题。
    *   保存资料时,确保昵称和个人简介中的换行符被移除。
    *   清除裁剪的头像图片,避免重复使用。
*   **评论点赞/取消点赞:**
    *   引入乐观更新策略,提升用户体验,点赞/取消点赞操作会立即反映在UI上,然后进行后台API调用。
    *   增加防抖机制,防止用户快速重复点击点赞/取消点赞按钮导致多次API请求。

**UI调整:**

*   **账户编辑页面:**
    *   页面切换动画调整为iOS风格的底部滑入滑出效果。
2025-09-03 14:21:13 +08:00
16f95782f8 优化AI页面资源管理和数据加载
- AgentViewModel:
    - 新增 `refreshAgentData` 方法用于刷新推荐Agent数据。
    - 新增 `ensureDataLoaded` 方法用于检查推荐Agent数据是否为空,如果为空则重新加载。
- ResourceCleanupManager:
    - `cleanupPageResources` 方法新增 `preserveRecommendedData` 参数,用于控制是否保留推荐数据。
    - 新增 `cleanupAiPageCompletely` 方法,用于完全清理AI页面资源(包括推荐数据),主要用于登出等场景。
- Agent.kt:
    - 在页面进入时调用 `viewModel.ensureDataLoaded()` 确保推荐Agent数据已加载。
    - 页面退出时不再清理推荐Agent数据,只在完全登出或需要彻底清理时才清理。

此更改旨在:
- 避免不必要的推荐Agent数据重复加载。
- 优化AI页面退出时的资源清理逻辑,仅在需要时才清理推荐数据。
2025-09-03 11:49:53 +08:00
3aa0172580 Api地址调整 2025-09-03 11:42:59 +08:00
a950504d6f 修改头像昵称获取方式,修改接口地址 2025-09-03 11:41:28 +08:00
288728f142 修复添加Agent时取消选择头像后数据被清空的问题
- 引入`isSelectingAvatar`状态来标记是否正在选择头像。
- 当用户从图片裁剪页面返回或取消选择时,不再清空`AddAgentViewModel`中的数据。
- 仅当用户从`AddAgent`页面返回(并且不是在选择头像的过程中)时,才清空已填写的数据。
- 调整了`AddAgent`页面的返回逻辑,以确保在选择头像过程中返回时数据得以保留。
2025-09-03 11:05:12 +08:00
db85deea96 群聊仅自己可见开关调整 2025-09-02 18:28:37 +08:00
7882ab8f19 评论区UI调整 2025-09-02 17:38:56 +08:00
2b0d33fdbe 上架图-缺省图调整 2025-09-02 16:32:59 +08:00
0ac3312fea 群聊信息UI调整 2025-09-01 18:52:50 +08:00
2f61850c33 群聊信息;更改密码UI调整 2025-09-01 18:17:50 +08:00
6c743a6cac VIP页面UI调整 2025-09-01 18:01:43 +08:00
c202f0d280 UI调整 2025-09-01 17:54:38 +08:00
c20b6ba682 动态tab栏UI调整
- 移除不安全的HttpClient,使用安全的HttpClient
- 动态tab栏非激活状态颜色调整
2025-09-01 17:46:00 +08:00
ab43f154f5 Refactor: 优化智能体操作交互
- 个人主页智能体列表项增加长按操作,用于弹出操作菜单。
- 实现智能体操作菜单弹窗,提供删除等操作选项。
- 增加删除智能体确认对话框,防止误操作。
- 移除账号页面密码输入框重构为通用组件。
2025-09-01 17:14:22 +08:00
9c7c87722b 切换评论排列方式时屏幕下方会出现红线调整 2025-09-01 16:51:12 +08:00
337bda46a2 Ai列表的游客模式优化 2025-09-01 16:14:53 +08:00
2e176605f7 Merge remote-tracking branch 'origin/main' 2025-09-01 16:03:58 +08:00
6721d715e7 关注、粉丝列表点击关注按钮增加游客登录判断 2025-09-01 16:03:12 +08:00
b9fac2c1ee 暗黑模式下更换头像后上方白边调整 2025-09-01 16:02:05 +08:00
118a6cf986 优化DropdownMenu UI
- 修复聊天页静音的显示文案问题
- 优化DropdownMenu的UI
2025-09-01 15:50:10 +08:00
36d322ef8c Reset ViewModels on logout/account switch
This commit introduces a `ResetModel()` function to `AgentViewModel` and `MineAgentViewModel` to clear their state.

This function is now called in `ResourceCleanupManager` and `AppState` during logout or when switching accounts to ensure that data from the previous session is not retained.

Additionally, the search and group name input fields in `CreateGroupChatScreen` are now single-line.
2025-09-01 15:36:22 +08:00
5c12982908 Refactor: Use common password validator
Refactors password validation logic to use a common `PasswordValidator` utility. This ensures consistent password validation rules across different parts of the application, including:

- User login
- Email sign-up
- Password change
- Account removal

Also adds a string resource for password too long error message.
2025-09-01 15:10:14 +08:00
4d319351b7 朋友圈刷新方式调整 2025-09-01 15:02:39 +08:00
76bcb1e7fc Limit user bio display to one line
Ensures that user bios in the user item component are truncated to a single line with an ellipsis if they exceed the available width. This applies to both users with existing bios and those with the "No bio here." placeholder.
2025-09-01 14:34:03 +08:00
83cff9d56c Enhance AI Agent Profile Interaction
This commit introduces several enhancements to how AI agent profiles are displayed and interacted with:

**Profile Display:**
- **AI Account Distinction:** Profile pages now differentiate between regular user accounts and AI agent accounts.
    - AI agent profiles will not display the "Agents" tab in their profile.
    - The profile header height is adjusted for AI accounts.
- **Navigation Parameter:** An `isAiAccount` boolean parameter is added to the `AccountProfile` navigation route to indicate if the profile being viewed belongs to an AI.

**Interaction & Navigation:**
- **Avatar Click Navigation:**
    - Clicking an AI agent's avatar in various lists (Hot Agents, My Agents, User Agents Row, User Agents List) now navigates to the agent's dedicated profile page.
    - When navigating to an agent's profile from an agent list, `isAiAccount` is set to `true`.
- **Chat Initiation:** Clicking the chat button on AI agent cards in the "Agent" tab (both Hot and My Agents) now correctly initiates a chat with the respective AI.
- **ViewModel Updates:**
    - `AgentViewModel`, `MineAgentViewModel`, and `HotAgentViewModel` now include a `goToProfile` function to handle navigation to agent profiles, correctly passing the `isAiAccount` flag.

**Code Refinements:**
- Click handlers for agent avatars and chat buttons are now wrapped with `DebounceUtils.simpleDebounceClick` to prevent multiple rapid clicks.
- The `UserContentPageIndicator` now conditionally hides the "Agent" tab based on the `isAiAccount` status.
- `UserAgentsRow` and `UserAgentsList` now accept an `onAvatarClick` callback for navigating to agent profiles.
- `AgentItem` (used in `UserAgentsRow`) and `UserAgentCard` (used in `UserAgentsList`) now handle avatar clicks.
- The general `Agent` composable (used in `AiPostComposable`) now also supports an `onAvatarClick` callback.
2025-09-01 14:17:44 +08:00
484d641554 Enhance AI Agent Profile Interaction
This commit introduces several enhancements to how AI agent profiles are displayed and interacted with:

**Profile Display:**
- **AI Account Distinction:** Profile pages now differentiate between regular user accounts and AI agent accounts.
    - AI agent profiles will not display the "Agents" tab in their profile.
    - The profile header height is adjusted for AI accounts.
- **Navigation Parameter:** An `isAiAccount` boolean parameter is added to the `AccountProfile` navigation route to indicate if the profile being viewed belongs to an AI.

**Interaction & Navigation:**
- **Avatar Click Navigation:**
    - Clicking an AI agent's avatar in various lists (Hot Agents, My Agents, User Agents Row, User Agents List) now navigates to the agent's dedicated profile page.
    - When navigating to an agent's profile from an agent list, `isAiAccount` is set to `true`.
- **Chat Initiation:** Clicking the chat button on AI agent cards in the "Agent" tab (both Hot and My Agents) now correctly initiates a chat with the respective AI.
- **ViewModel Updates:**
    - `AgentViewModel`, `MineAgentViewModel`, and `HotAgentViewModel` now include a `goToProfile` function to handle navigation to agent profiles, correctly passing the `isAiAccount` flag.

**Code Refinements:**
- Click handlers for agent avatars and chat buttons are now wrapped with `DebounceUtils.simpleDebounceClick` to prevent multiple rapid clicks.
- The `UserContentPageIndicator` now conditionally hides the "Agent" tab based on the `isAiAccount` status.
- `UserAgentsRow` and `UserAgentsList` now accept an `onAvatarClick` callback for navigating to agent profiles.
- `AgentItem` (used in `UserAgentsRow`) and `UserAgentCard` (used in `UserAgentsList`) now handle avatar clicks.
- The general `Agent` composable (used in `AiPostComposable`) now also supports an `onAvatarClick` callback.
2025-09-01 01:10:35 +08:00
12b3c15083 允许在群聊列表中跳转到群聊信息页面 2025-09-01 00:02:20 +08:00
cb253d3276 完善个人信息编辑
- 修复了从相册选择图片时,如果文件名不包含扩展名导致的崩溃问题。
- 在编辑个人信息页面增加了“修改密码”的入口。
- 修复了新建Agent时,保存按钮状态更新不及时的问题。
- 优化了新建Agent时,对异常的处理。
2025-08-31 23:59:05 +08:00
2907e7f9a6 Refactor: 优化关注列表和代码逻辑
本次提交主要包含以下更改:

- **关注/粉丝列表逻辑修正**:修复了在 `FollowerListViewModel` 和 `FollowingListViewModel` 中 `followerId` 和 `followingId` 属性赋值错误的问题,确保正确加载关注和粉丝列表。
- **分页大小调整**:将 `BaseFollowModel` 中分页加载的 `pageSize` 从 5 调整为 20,以提高用户体验。
- **个人资料页智能体展示**:
    - 在 `AccountProfileV2` 和 `AccountProfileViewModel` 中增加了对用户智能体列表的加载和展示逻辑。
    - 修复了 `MyProfileViewModel` 中加载当前用户智能体时 `authorId` 传递错误的问题。
    - 优化了 `UserAgentsRow` 和 `UserAgentsViewModel` 的逻辑,确保正确加载和显示用户智能体,并在用户切换时清理旧数据。
- **代码清理**:移除了部分冗余的 `println` 调试信息。
- **Agent创建流程优化**:在 `AddAgentViewModel` 和 `AgentImageCropScreen` 中,确保在已有裁剪图片时直接使用,避免重复裁剪。
2025-08-31 23:50:52 +08:00
281169cfcb UI优化 2025-08-31 23:26:13 +08:00