防止桌面端调整窗口大小时封面闪烁,优化首页列数计算方法#1573
Closed
yaoyaozijing wants to merge 5 commits intoPredidit:mainfrom
Closed
Conversation
Contributor
yaoyaozijing
commented
Dec 15, 2025
- 对桌面端使用固定的缓存尺寸,以避免调整窗口大小时反复重载番剧封面导致的闪烁感。而对移动端保留原有内存优化法
- 优化推荐、追番页列数计算方法,超过Compact宽度后,宽度每增加200时增加一列,以在超宽窗口中显示更多内容。
Owner
|
我个人不是很喜欢这个实现,它浪费了内存并且破坏了跨平台一致性 |
Contributor
Author
|
更换了新写法,各平台保持一致、同时节约了内存。 |
Owner
|
新的写法似乎没有解决闪烁,组件树仍然会完全重建 |
Contributor
Author
|
@Predidit 切换底栏/侧栏时的组件树重建问题已修复 |
Owner
|
抱歉,我今天有些忙,我会在明天进行 CR |
Owner
|
我有些没有明白我们将 networkimagelayer 转换为有状态组件的作用是什么 按照 flutter 最佳实践,应尽量使用无状态组件,它们的性能更好 |
Contributor
Author
|
是为了解决这个问题:窗口宽度调整会带动番剧封面尺寸变化,这会导致目标缓存尺寸变化,触发封面重新缓存,造成抖动。 |
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.