Skip to content

Commit

Permalink
yoyiyi
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyiyi committed Aug 8, 2017
1 parent 4e9b5fd commit ac05a1b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/src/main/java/com/yoyiyi/soleil/base/RxPresenter.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
public class RxPresenter<T extends BaseContract.BaseView> implements BaseContract.BasePresenter<T> {

protected T mView;
protected CompositeDisposable mCompositeDisposable;
private CompositeDisposable mCompositeDisposable;

protected void unSubscribe() {
private void unSubscribe() {
if (mCompositeDisposable != null) {
mCompositeDisposable.dispose();
}
Expand All @@ -27,10 +27,7 @@ protected void unSubscribe() {
* @param disposable disposable
*/
protected boolean remove(Disposable disposable) {
if (mCompositeDisposable != null) {
return mCompositeDisposable.remove(disposable);
}
return false;
return mCompositeDisposable != null && mCompositeDisposable.remove(disposable);
}

protected void addSubscribe(Disposable disposable) {
Expand Down

0 comments on commit ac05a1b

Please sign in to comment.