修改测试问题,shouye ytuijian
This commit is contained in:
parent
425030cd47
commit
94b795213a
@ -0,0 +1,6 @@
|
|||||||
|
package com.yunbao.common.event;
|
||||||
|
|
||||||
|
import com.yunbao.common.bean.BaseModel;
|
||||||
|
|
||||||
|
public class CloseEvent extends BaseModel {
|
||||||
|
}
|
@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
|
import com.yunbao.common.event.CloseEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.base.HttpCallback;
|
import com.yunbao.common.http.base.HttpCallback;
|
||||||
import com.yunbao.common.http.live.LiveNetManager;
|
import com.yunbao.common.http.live.LiveNetManager;
|
||||||
@ -158,6 +159,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Bus.get().post(new CloseEvent());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
|
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
|
||||||
@ -189,6 +191,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Bus.get().post(new CloseEvent());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -258,6 +261,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Bus.get().post(new CloseEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -324,6 +328,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -337,7 +342,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
((LiveAudienceActivity) mContext).exitLiveRoom();
|
((LiveAudienceActivity) mContext).exitLiveRoom();
|
||||||
} else if (mContext instanceof LiveRyAnchorActivity) {
|
} else if (mContext instanceof LiveRyAnchorActivity) {
|
||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
((LiveRyAnchorActivity) mContext).superBackPressed();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ import com.yunbao.live.bean.LiveBean;
|
|||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
|
import com.yunbao.common.event.CloseEvent;
|
||||||
import com.yunbao.main.event.JumpUserHomeEvent;
|
import com.yunbao.main.event.JumpUserHomeEvent;
|
||||||
import com.yunbao.main.fragment.SearchRecommendFragment;
|
import com.yunbao.main.fragment.SearchRecommendFragment;
|
||||||
import com.yunbao.main.fragment.SearchResultsFragment;
|
import com.yunbao.main.fragment.SearchResultsFragment;
|
||||||
@ -168,7 +169,7 @@ public class SearchActivity extends AbsActivity {
|
|||||||
*/
|
*/
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onJumpUserHome(JumpUserHomeEvent event) {
|
public void onJumpUserHome(JumpUserHomeEvent event) {
|
||||||
LiveHttpUtil.getLiveInfo(event.getModel().getId()+ "", new HttpCallback() {
|
LiveHttpUtil.getLiveInfo(event.getModel().getId() + "", new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
@ -214,4 +215,12 @@ public class SearchActivity extends AbsActivity {
|
|||||||
transaction.commit();
|
transaction.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
|
public void onClose(CloseEvent event) {
|
||||||
|
if (!isFinishing()) {
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user