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

如果viewPager2中fragment较多,此时切换fragment会执行生命周期方法onDestroy.此时viewModel会执行clear方法,导致fragment切换回来后协程为cancelled状态,无法继续调用接口 #48

Open
hankooxiaozei opened this issue Jul 27, 2020 · 0 comments

Comments

@hankooxiaozei
Copy link

如题,

@hankooxiaozei hankooxiaozei changed the title 如果viewPager2中fragment较多,此时切换fragment会执行生命周期onDestroyView.此时viewModel会执行clear方法,导致fragment切换回来后协程为cancelled状态,无法继续调用接口 如果viewPager2中fragment较多,此时切换fragment会执行生命周期方法onDestroy.此时viewModel会执行clear方法,导致fragment切换回来后协程为cancelled状态,无法继续调用接口 Jul 27, 2020
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

No branches or pull requests

1 participant