Commit Graph

395 Commits

Author SHA1 Message Date
b06f2d6c4a 动态模块新增推荐Tab,UI优化及调整
- 新增推荐Tab,采用垂直滑动样式,展示推荐动态内容。
- 推荐Tab支持预加载周围图片,提升滑动体验,并增加loading和错误状态指示。
- 优化评论弹窗UI,移除自动聚焦,调整背景色和输入框样式。
- 动态Tab样式调整,使用下划线指示当前选中Tab。
- 调整MomentLoaderExtraArgs,增加trend参数用于推荐动态加载。
- 新增字符串资源 `index_recommend`。
2025-09-16 16:43:42 +08:00
a215d79ce8 Feat: Add News tab and related functionality
- Added a "News" tab to the main index screen.
- Implemented API parameters for fetching news-specific posts: `imageTag`, `search`, `advancedSearch`, `newsFilter`, `onlyNews`, `newsSource`, `newsLanguage`, `newsCategory`, `requireImageCache`.
- Updated `Moment` data class and `MomentEntity` to include news-related fields like `isNews`, `newsTitle`, `newsUrl`, etc.
- Created `News.kt` composable and `NewsViewModel.kt` to display and manage news items.
- Updated `MomentLoader` to include a `newsOnly` parameter for fetching only news items.
- Added Japanese translations for new index tab strings: "Worldwide", "Dynamic", "Following", "Hot", and "News".
- Adjusted tab count and layout based on guest/logged-in user status to accommodate the new "News" tab.
2025-09-16 14:08:50 +08:00
0e0d622864 Refactor: Optimize Agent tab UI and add chat room recommendations
- Implemented lazy loading for Agent list with pagination.
- Added a section for recommended chat rooms.
- Restructured Agent tab UI:
    - Fixed the top search bar.
    - Organized content into scrollable sections for "Today's Picks", "Recommended Chat Rooms", and "Find Agents".
    - Improved Agent card design with theme-aware backgrounds.
- Introduced `ChatRoom` data class and integrated chat room loading logic in `AgentViewModel`.
- Updated `RiderProAPI` to include `random` parameter for fetching random rooms.
- Enhanced Agent card and chat room card click handling with debounce.
2025-09-15 23:30:10 +08:00
a1196715d0 Feat: Add News tab and related functionality
- Added a "News" tab to the main index screen.
- Implemented API parameters for fetching news-specific posts: `imageTag`, `search`, `advancedSearch`, `newsFilter`, `onlyNews`, `newsSource`, `newsLanguage`, `newsCategory`, `requireImageCache`.
- Updated `Moment` data class and `MomentEntity` to include news-related fields like `isNews`, `newsTitle`, `newsUrl`, etc.
- Created `News.kt` composable and `NewsViewModel.kt` to display and manage news items.
- Updated `MomentLoader` to include a `newsOnly` parameter for fetching only news items.
- Added Japanese translations for new index tab strings: "Worldwide", "Dynamic", "Following", "Hot", and "News".
- Adjusted tab count and layout based on guest/logged-in user status to accommodate the new "News" tab.
2025-09-15 18:31:24 +08:00
68273ae166 Fix: Correct BASE_SERVER URL for debug and release builds
The BASE_SERVER constant was incorrectly assigning the release URL to debug builds and vice-versa. This commit fixes the logic to ensure the correct API endpoint is used for each build type.
2025-09-15 13:46:01 +08:00
6c7be4ba47 feat: Add string resources for Create Agent V2
This commit introduces new string resources for the "Create Agent V2" feature.
These strings are provided in English, Chinese, and Japanese to support localization.

The added strings cover various UI elements and messages within the Create Agent V2 flow, including:
- Titles and labels (e.g., "Create AI", "Name", "Description")
- User guidance and prompts (e.g., "Hello %s! What would you like to create today?", "An AI that writes poetry...")
- Action button texts (e.g., "AI Enhancement", "Manually Create AI", "Alright, that's the one")
- Status messages (e.g., "Generating...", "Creating...", "Thinking for you")
- Accessibility descriptions for icons (e.g., "AI Avatar", "Edit Icon")
2025-09-15 13:42:58 +08:00
cf25540417 Refactor: Implement V2 of Create Agent UI and logic
- Introduced `CreateAgentV2Screen` and `CreateAgentV2ViewModel` for a new agent creation experience.
- Implemented AI-powered agent info generation based on user input, including title and description.
- Added a "manual mode" for users who prefer to input agent details directly.
- Enhanced UI with gradient borders, loading animations, and improved layout.
- Integrated avatar selection and cropping using `AgentImageCropScreen`.
- Refactored `AddAgentViewModel` to support state persistence across page navigation and to store generated input text.
- Updated API client to include a longer timeout for agent info generation requests.
- Added new drawable resources for UI elements.
- Switched `Const.BASE_SERVER` to use the release URL for debug builds.
- Replaced the old `AddAgentScreen` with the new `CreateAgentV2Screen` in navigation.
2025-09-15 12:03:39 +08:00
eca85c8377 Feat: Add Create Bottom Sheet and icons
- Implemented a new `CreateBottomSheet` Composable to provide users with options to create AI, Group Chat, or Moment.
- Added new drawable resources for the create options: `ic_create_ai.xml`, `ic_create_group_chat.xml`, `ic_create_monent.xml`, and `ic_create_close.xml`.
- Integrated the `CreateBottomSheet` into the `IndexScreen`. Clicking the "+" button now opens this bottom sheet instead of directly navigating to new post creation.
- Updated `IndexViewModel` to manage the visibility state of the `CreateBottomSheet`.
- Added string resources for the Create Bottom Sheet in English, Chinese, and Japanese.
- Ensured proper navigation and tourist mode checks for each create option.
- Implemented graceful dismissal of the bottom sheet with animations.
2025-09-12 17:21:29 +08:00
f8be622ba6 Merge pull request #17 from Zhong202501/main
首页Agent卡片组件
2025-09-10 19:22:52 +08:00
f3c841779b Merge pull request #18 from Kevinlinpr/ll
修复一些未处理异常,切换到测试服务器
2025-09-10 19:19:38 +08:00
57e4614ce8 修复一些未处理异常,切换到测试服务器 2025-09-10 18:34:36 +08:00
922d6e72d6 首页Agent卡片组件 2025-09-10 18:02:58 +08:00
c41c097d41 处理最新消息显示 2025-09-10 14:03:27 +08:00
5218ca7046 重构IM viewmodel代码 2025-09-10 11:57:05 +08:00
ce6ee7bf82 imsdk 调通 2025-09-09 19:05:07 +08:00
e00deb5661 merge conflict 2025-09-09 17:57:28 +08:00
95d6522a54 fix im connect error 2025-09-09 17:53:52 +08:00
d231f3678c 首页UI 2025-09-09 16:18:35 +08:00
cd35562244 标签页调整 2025-09-09 14:41:37 +08:00
21cb512237 启动图标;动态界面调整 2025-09-08 18:06:39 +08:00
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
ef04450696 移除二进制文件 2025-09-05 16:54:24 +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