Closed bailyzheng closed 7 years ago
How about getView()?
In my project I use a method in base presenter class
public void deliver(@NonNull Action1<? super View> onNext, @NonNull Action1<Throwable> onError) {
view().filter(v -> v != null)
.take(1)
.subscribe(onNext, onError);
}
which delivers a desired action to View as soon as possible.
@yankeppey right, thank you. I think get view is not recommend in presenter by the author. So view and presenter is decoupling.
In MVP model, view and presenter can known each other. Nucleus can get presenter by getPresenter(). How to get view in presenter class?