In UserPresenter, subscription class variable is never set.
Laimiux opened this issue · comments
Shouldn't this
@Override
public void start() {
getObservable().subscribe(getSubscriber());
}
be
@Override
public void start() {
subscription = getObservable().subscribe(getSubscriber());
}
and this
@Override
public void finish() {
subscription.unsubscribe();
}
be
@Override
public void finish() {
subscription.unsubscribe();
subscription = Subscriptions.empty();
}
Yes this is a bug. Thanks for pointing it out!
I have update the code just now. One thing to not is we usually dont re-use presenters so we dont reset to Subscriptions.empty()
but if you want to cache them its a valid approach.