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

问个rxjava问题 #11

Closed
slz17 opened this issue Dec 6, 2019 · 1 comment
Closed

问个rxjava问题 #11

slz17 opened this issue Dec 6, 2019 · 1 comment

Comments

@slz17
Copy link

slz17 commented Dec 6, 2019

override fun getBannList(): Observable<ApiResponse<MutableList>> {
return Observable.just(mRepositoryManager
.obtainRetrofitService(Api::class.java)
.getBanner())
.flatMap { apiResponseObservable ->
apiResponseObservable
}
}
为什么不是
mRepositoryManager
.obtainRetrofitService(Api::class.java)
.getBanner()
包一层再展开有特殊效果吗?

@hegaojian
Copy link
Owner

刚开始编写这个项目请求网络的时候想支持缓存的,后面出现了一个暂时无法解决的bug,就把这个写法一直遗留下来了,写到后面的请求时没注意偷懒一直Ctrl+C V,导致全部都是这样了, 这是一个问题,虽然不会出错,但是很容易误导别人,感谢老哥你的细心阅读代码,抽空我去给他改掉:joy::joy::joy:

hegaojian pushed a commit that referenced this issue Dec 6, 2019
请求网络写法纠正,具体看issue #11
hegaojian pushed a commit that referenced this issue Dec 6, 2019
请求网络写法纠正,具体看issue #11
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