Skip to content

切换菜单栏形式前停止旧动画 - #21

Merged
TNT-Likely merged 1 commit into
TNT-Likely:mainfrom
1254455745:review/animation-cleanup-v2
Jun 4, 2026
Merged

切换菜单栏形式前停止旧动画#21
TNT-Likely merged 1 commit into
TNT-Likely:mainfrom
1254455745:review/animation-cleanup-v2

Conversation

@1254455745

Copy link
Copy Markdown
Contributor

这个 PR 优化菜单栏展示形式切换时的动画状态清理。

改动内容:

  • 切换滚动、轮播、固定等菜单栏形式前停止旧视图动画。
  • 避免旧动画状态残留到新视图。
  • 补充统一的动画失效接口。

验证:

  • 单独分支构建通过。

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes — stops ticker animations before swapping views to prevent stale CVDisplayLink callbacks from firing against a replaced view.

  • Add invalidateAnimation() to MenuBarTickerView protocol — new protocol requirement that all conforming types implement.
  • Implement in TickerView and CarouselTickerView — delegates to existing stopAnimation(), which stops and nils the CVDisplayLink.
  • No-op in CompactTickerView and MinimalTickerView — these static views have no animations to invalidate.
  • Call from StatusItemController.swapTickerView(to:) — calls invalidateAnimation() before constructing the new view, ensuring the old display link is stopped before it can fire against the old (soon-to-be-released) view.

Pullfrog  | View workflow run | Using DeepSeek Flash𝕏

@TNT-Likely
TNT-Likely merged commit ed7e790 into TNT-Likely:main Jun 4, 2026
1 check passed
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