-
Notifications
You must be signed in to change notification settings - Fork 253
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
2.0.0 forces rx/observables #28
Comments
Hi,
Do you have a use case for it? |
My presenter calls methods on the associated view, but I'm not using Rx. Ususally just "getView().setFoo( true );" I'm sure I can do the same with the observable returned by RxPresenter.view(), but I'm not using that functionality, so it seems odd to need it. For now I've just defined my own view in my presenter class and am setting it during onTakeView. |
Sounds reasonable. I was planning to completely drop non-rx part of the library. |
I'm mostly avoiding it because:
My understanding, regarding 1), is that this:
... will become something like this:
That's just ugly, and non-necessary. |
Ok, I've got your point. I do not use retrolambda as well. :) Do you know that calling You don't need Rx guarantee that the callback is called only when |
Regarding NPE, I generally do null checks. If they get too cumbersome, I just wrap the whole thing in an update function that does an early out if getView() is null. Btw, it looks like RxPresenter calls view.onNext(null); during onDropView. Doesn't that mean a null check within the observable will be necessary? Regarding Rx in general; I find it difficult to wrap my head around how to handle everything. As an example, one case where I'm using it is: I have a RecyclerView with N objects in it. When you click one, it calls all the way back to the presenter, passing the ID of the clicked object. I needed to debounce those clicks before taking action, and after struggling a bit I ended up with an entire list of PublishSubjects, that mirrors the list of objects, to handle the clicks because I couldn't figure out how to get the debouce to work on a per-ID basis with just a single publish subject or observable. |
Yes, I will keep Thanks for the feedback. |
The only real Presenter class in 2.0.0 is now RxPresenter. This seems kind of silly. Can we get a basic presenter that at least has "getView()" something similar?
The text was updated successfully, but these errors were encountered: