🐛 修复了签到动画的更新问题以及宽屏下底部签到组件占满屏幕的bug - #590
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 聚焦于「签到」页面的 UI 体验修复:一方面修正周进度线动画在状态更新时可能出现的“首帧直接满进度”问题;另一方面优化宽屏场景下底部签到面板的布局,避免组件在大屏上占满屏幕导致观感异常。
Changes:
- 将周线动画触发从 SharedFlow 事件改为带 id 的 StateFlow 请求,并在 UI 侧确保首帧以 0f 绘制后再启动动画。
- 宽屏适配:底部面板改为在宽屏下使用固定高度,并在父容器中做底部对齐,避免铺满整屏。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cyxbs-pages/mine/src/commonMain/kotlin/com/cyxbs/pages/mine/sign/widget/WeekSignProgress.kt | 通过 lifecycle-aware 收集动画请求,并在绘制与 LaunchedEffect 中协调首帧 0f + 动画执行与回收 |
| cyxbs-pages/mine/src/commonMain/kotlin/com/cyxbs/pages/mine/sign/viewmodel/SignComposeViewModel.kt | 用 StateFlow 发布一次性周线动画请求(带 id),并提供 finish 回收逻辑避免重复/错位动画 |
| cyxbs-pages/mine/src/commonMain/kotlin/com/cyxbs/pages/mine/sign/ui/SignScreen.kt | 引入 BoxWithConstraints 做宽屏高度策略,调整底部面板在大屏下的尺寸与底部对齐 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+12
| import com.cyxbs.pages.mine.sign.widget.WeekLineState | ||
| import com.cyxbs.pages.mine.sign.widget.toWeekLineStates |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.