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.
原本的滚动逻辑会因为显示器刷新率不同而导致滚动行为快慢不一致,本次更新重写了部分滚动逻辑,每次通过时间戳判断下次要滚动的距离。该改动会导致滚动手感与原本不一致,另外隐藏配置中的 precision 没有再使用。
滚动时长计算方式为:滚动时长随滚动距离长短在 300ms 基础上非线形增长,待滚动距离达到 10000px 时滚动时长达到最大。配置中的滚动时长配置代表着最大滚动时长,分别为 300,800, 1300, 1800, 2300
另外尝试修复了线程崩溃,有可能是 CVDisplayLink 启动的子线程与主线程协作出现了问题,现在改为每次滚轮时都重启 CVDisplayLink,测试后两天内已经没出现过线程奔溃问题