-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor:调整系统浮窗安全区逻辑 #190
refactor:调整系统浮窗安全区逻辑 #190
Conversation
审核者指南由 Sourcery 提供此 PR 通过改进系统窗口标志和屏幕高度计算的处理来重构浮动窗口的安全区域逻辑。更改主要集中在重新组织窗口布局标志管理和引入更明确的安全区域控制。 更新后的 FxSystemContainerView 类图classDiagram
class FxSystemContainerView {
+Pair<Int, Int> parentSize()
+void updateEnableHalfStatus(Boolean enableHalfHide)
+void updateKeyBoardStatus(Boolean showKeyBoard)
+void initWLParams()
+void safeUpdateViewLayout(WindowManager.LayoutParams lp)
+Int defaultFlags
+Int checkFullFlags(Boolean enableHalfHide, Boolean enableSafeArea)
}
note for FxSystemContainerView "重构以使用 realScreenHeight 和 checkFullFlags 进行窗口布局管理。"
更新后的 FxAppHelper 类图classDiagram
class FxAppHelper {
-Boolean isEnableSafeArea
+Boolean enableSafeArea
+Builder setEnableSafeArea(Boolean isEnable)
}
note for FxAppHelper "重命名 isEnableSafeArea 为 enableSafeArea 以保持一致性。"
文件级更改
提示和命令与 Sourcery 互动
自定义您的体验访问您的仪表板以:
获取帮助Original review guide in EnglishReviewer's Guide by SourceryThis PR refactors the floating window's safe area logic by improving the handling of system window flags and screen height calculations. The changes primarily focus on reorganizing the window layout flags management and introducing more explicit safe area control. Updated class diagram for FxSystemContainerViewclassDiagram
class FxSystemContainerView {
+Pair<Int, Int> parentSize()
+void updateEnableHalfStatus(Boolean enableHalfHide)
+void updateKeyBoardStatus(Boolean showKeyBoard)
+void initWLParams()
+void safeUpdateViewLayout(WindowManager.LayoutParams lp)
+Int defaultFlags
+Int checkFullFlags(Boolean enableHalfHide, Boolean enableSafeArea)
}
note for FxSystemContainerView "Refactored to use realScreenHeight and checkFullFlags for window layout management."
Updated class diagram for FxAppHelperclassDiagram
class FxAppHelper {
-Boolean isEnableSafeArea
+Boolean enableSafeArea
+Builder setEnableSafeArea(Boolean isEnable)
}
note for FxAppHelper "Renamed isEnableSafeArea to enableSafeArea for consistency."
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嘿 @Petterpx - 我已经审查了你的更改 - 这里有一些反馈:
总体评论:
- 在 safeRemoveView() 中移除 isAttachedToWindow 检查可能会导致问题。考虑保留此检查以防止尝试移除未附加到窗口的视图。
这是我在审查期间查看的内容
- 🟡 一般问题:发现 1 个问题
- 🟢 安全性:一切看起来都很好
- 🟢 测试:一切看起来都很好
- 🟢 复杂性:一切看起来都很好
- 🟢 文档:一切看起来都很好
帮助我变得更有用!请在每条评论上点击 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English
Hey @Petterpx - I've reviewed your changes - here's some feedback:
Overall Comments:
- The removal of the isAttachedToWindow check in safeRemoveView() could potentially cause issues. Consider keeping this check to prevent attempting to remove views that aren't attached to the window.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
重构系统浮动窗口逻辑以改善安全区域和窗口标志的处理。更新文档以反映库的最新版本。
增强功能:
文档:
Original summary in English
Summary by Sourcery
Refactor the system floating window logic to improve the handling of safe areas and window flags. Update documentation to reflect the latest version of the library.
Enhancements:
Documentation: