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

关于tableView demo切换不同的Category后请求多次弹加载成功 #1

Open
Arihin opened this issue Apr 22, 2021 · 1 comment

Comments

@Arihin
Copy link

Arihin commented Apr 22, 2021

在AnchorGirlViewModel中,对category进行了订阅,然后里面又进行了对requestCommond的订阅,在category多次切换之后,造成了requestCommond的多次订阅,且没有释放(因为声明的disposeBag会全局一直持有),导致其中的网络请求也会请求多次,应该处理好对requestCommond订阅的释放来避免.目前我是另起一个bag,然后在订阅的category里面再给bag赋新值,requestCommond使用这个bag,可以修复这个重复多订阅的问题

@WangQingLei307909
Copy link
Owner

WangQingLei307909 commented Apr 22, 2021 via email

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

2 participants