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

fix PAGViewListener callback unexpected not called #2504

Closed
wants to merge 4 commits into from

Conversation

zeinx920
Copy link
Contributor

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.35%. Comparing base (8aab41f) to head (d74ec58).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2504      +/-   ##
==========================================
- Coverage   77.55%   77.35%   -0.21%     
==========================================
  Files         420      420              
  Lines       22456    22456              
  Branches     6311     6349      +38     
==========================================
- Hits        17415    17370      -45     
- Misses       3800     3818      +18     
- Partials     1241     1268      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Hparty
Copy link
Collaborator

Hparty commented Sep 29, 2024

PAGViewController cannot hold PAGViewListener. Doing so may lead to a circular reference. If this is needed, it is recommended that the business holds the PAGViewListener itself. This cannot be merged.

@Hparty Hparty closed this Sep 29, 2024
@zeinx920
Copy link
Contributor Author

PAGViewController cannot hold PAGViewListener. Doing so may lead to a circular reference. If this is needed, it is recommended that the business holds the PAGViewListener itself. This cannot be merged.

现在PAGViewListener回调有问题,复杂场景下const listener = weakListener.deref()取出的时候会变成null导致listener.onAnimationEnd(this)执行不了

@Hparty
Copy link
Collaborator

Hparty commented Sep 29, 2024

PAGViewController cannot hold PAGViewListener. Doing so may lead to a circular reference. If this is needed, it is recommended that the business holds the PAGViewListener itself. This cannot be merged.

现在PAGViewListener回调有问题,复杂场景下const listener = weakListener.deref()取出的时候会变成null导致listener.onAnimationEnd(this)执行不了

检查一下listener的生命周期,看上去是listener已经释放了,这时候确实不应该回调了。listener的生命周期应该由业务控制,PAGViewController不应该直接持有listener

@zeinx920
Copy link
Contributor Author

PAGViewController cannot hold PAGViewListener. Doing so may lead to a circular reference. If this is needed, it is recommended that the business holds the PAGViewListener itself. This cannot be merged.

现在PAGViewListener回调有问题,复杂场景下const listener = weakListener.deref()取出的时候会变成null导致listener.onAnimationEnd(this)执行不了

检查一下listener的生命周期,看上去是listener已经释放了,这时候确实不应该回调了。listener的生命周期应该由业务控制,PAGViewController不应该直接持有listener

好的,感谢回复

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.

4 participants