|
|
|
@ -107,13 +107,14 @@ public class RxPresenter<View> extends Presenter<View> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Checks if a restartable is started.
|
|
|
|
|
* Checks if a restartable is subscribed.
|
|
|
|
|
*
|
|
|
|
|
* @param restartableId id of a restartable.
|
|
|
|
|
* @return True if the restartable is started, false otherwise.
|
|
|
|
|
* @return True if the restartable is subscribed, false otherwise.
|
|
|
|
|
*/
|
|
|
|
|
public boolean isStarted(int restartableId) {
|
|
|
|
|
return requested.contains(restartableId);
|
|
|
|
|
public boolean isSubscribed(int restartableId) {
|
|
|
|
|
Subscription s = restartableSubscriptions.get(restartableId);
|
|
|
|
|
return s != null && !s.isUnsubscribed();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -329,4 +330,14 @@ public class RxPresenter<View> extends Presenter<View> {
|
|
|
|
|
protected void onDropView() {
|
|
|
|
|
views.onNext(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Please, use restartableXX and deliverXX methods for pushing data from RxPresenter into View.
|
|
|
|
|
*/
|
|
|
|
|
@Deprecated
|
|
|
|
|
@Nullable
|
|
|
|
|
@Override
|
|
|
|
|
public View getView() {
|
|
|
|
|
return super.getView();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|