fix bugs.
This commit is contained in:
@@ -213,7 +213,6 @@ public class DailyTasksActivity extends BaseMvpActivity<DailyTasksPresenter, Act
|
||||
super.onPause();
|
||||
Observable.timer(5, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(aLong -> {
|
||||
mBinding.coolWaitView.setVisibility(View.GONE);
|
||||
|
||||
if (!isFinishing()){
|
||||
finish();
|
||||
}
|
||||
@@ -267,7 +266,6 @@ public class DailyTasksActivity extends BaseMvpActivity<DailyTasksPresenter, Act
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
((RoomActivity) ActivityUtils.getActivityList().get(ActivityUtils.getActivityList().size() - 2)).refreshRoomInfo(roomId);
|
||||
finish();
|
||||
return;
|
||||
|
||||
@@ -9,11 +9,16 @@ import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.http.RetrofitClient;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class DailyTasksPresenter extends BasePresenter<DailyTasksConacts.View> implements DailyTasksConacts.IMePre{
|
||||
|
||||
DailyTasksConacts.View mView;
|
||||
public DailyTasksPresenter(DailyTasksConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
mView = view;
|
||||
}
|
||||
//获取礼盒列表
|
||||
@Override
|
||||
@@ -27,6 +32,9 @@ public class DailyTasksPresenter extends BasePresenter<DailyTasksConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(GiftBoxBean giftBoxBean) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setGiftBox(giftBoxBean);
|
||||
}
|
||||
});
|
||||
@@ -42,6 +50,9 @@ public class DailyTasksPresenter extends BasePresenter<DailyTasksConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(GiftName giftName) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().dailyTasksOpenBox(giftName);
|
||||
}
|
||||
});
|
||||
@@ -58,6 +69,9 @@ public class DailyTasksPresenter extends BasePresenter<DailyTasksConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().dailyTasksComplete();
|
||||
}
|
||||
});
|
||||
@@ -75,6 +89,9 @@ public class DailyTasksPresenter extends BasePresenter<DailyTasksConacts.View> i
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null){
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().taskJumpRoom(item,s);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user