Skip to content

知乎Demo中ZhihuThirdFragment使用懒加载会造成ShopFragment的onSupportVisible被调用2次 #416

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

Closed
harv opened this issue Jul 7, 2017 · 2 comments
Labels

Comments

@harv
Copy link

harv commented Jul 7, 2017

首次打开ZhihuThirdFragment时,懒加载ShopFragment。ZhihuThirdFragment 会在https://github.com/YoKeyword/Fragmentation/blob/master/fragmentation_core/src/main/java/me/yokeyword/fragmentation/helper/internal/VisibleDelegate.java#L157 调用ShopFragment的dispatchSupportVisible,同时由于此时ShopFragment自己也会调用dispatchSupportVisible,造成onSupportVisible被调用2次。

而没有使用懒加载的ZhihuSecondFragment,没有这个问题。

@YoKeyword
Copy link
Owner

@harv 是的,确实嵌套场景下第一次visible时调用了2次, 明天我处理下 :)

@YoKeyword
Copy link
Owner

v1.0.6 已Fix,dispatchSupportVisible()内部的调用顺序问题 🍺 :)

@YoKeyword YoKeyword added the bug label Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants