Skip to content
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

optimize panel hide logic #641

Merged
merged 1 commit into from
Jan 21, 2025
Merged

optimize panel hide logic #641

merged 1 commit into from
Jan 21, 2025

Conversation

ErBWs
Copy link
Contributor

@ErBWs ErBWs commented Jan 21, 2025

Xcode 升级完罢工了,CocoaPod broken。

电脑端因为升级前就一直开着软件所以 hot reload 可以调试,手机端直接调不了了

最令我无语的是不知道为什么安卓也调试失败了 :(

电脑端应该没啥问题,鼠标进入 player panel 后不会隐藏,打开 MenuAnchor 禁止隐藏,关闭时恢复

@Predidit
Copy link
Owner

我之前在社区看到过很多人抱怨 Xcode 相关问题,这似乎是一个并不罕见的问题,也许可以先简单尝试清理 flutter 和 CocoaPod 缓存

我对 lib/pages/player/player_item.dartL592-601 的实现有一些疑问

看上去虽然我们在部分区域移动时不会产生面板隐藏相关定时器

但是当我们的鼠标从屏幕中央区域移动到面板区域时 (这很常见) ,在非面板区域移动时产生的定时器并不会被取消

这样的话,虽然我们的鼠标最终停靠在面板区域,面板仍然会隐藏,这不符合预期

@ErBWs
Copy link
Contributor Author

ErBWs commented Jan 21, 2025

定时器在 panel 文件的鼠标区域 onEnter 取消

我测试下来应该没什么问题

区分不同区域的 onHover 是因为面板区域移动鼠标会同时触发 player_item 和 panel 的鼠标区域事件

面板区域 onHover 单独配置无定时器的显示函数是为了解决直接从屏幕外移入面板区域不会显示面板

@Predidit Predidit merged commit 0edfa81 into Predidit:main Jan 21, 2025
6 checks passed
@ErBWs ErBWs deleted the mod-player-panel branch January 21, 2025 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants