修改测试问题,shouye ytuijian

This commit is contained in:
18401019693 2022-08-10 22:51:40 +08:00
parent 425030cd47
commit 94b795213a
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,6 @@
package com.yunbao.common.event;
import com.yunbao.common.bean.BaseModel;
public class CloseEvent extends BaseModel {
}

View File

@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSON;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.SetAttentsModel;
import com.yunbao.common.event.CloseEvent;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.base.HttpCallback;
import com.yunbao.common.http.live.LiveNetManager;
@ -158,6 +159,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
((LiveRyAnchorActivity) mContext).superBackPressed();
}
Bus.get().post(new CloseEvent());
}
});
GridLayoutManager gridLayoutManager = new GridLayoutManager(mContext, 3);
@ -189,6 +191,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
((LiveRyAnchorActivity) mContext).superBackPressed();
}
Bus.get().post(new CloseEvent());
}
});
}
@ -258,6 +261,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
((LiveRyAnchorActivity) mContext).superBackPressed();
}
Bus.get().post(new CloseEvent());
}
@Override
@ -324,6 +328,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
((LiveRyAnchorActivity) mContext).superBackPressed();
}
}
});
@ -337,7 +342,6 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
((LiveAudienceActivity) mContext).exitLiveRoom();
} else if (mContext instanceof LiveRyAnchorActivity) {
((LiveRyAnchorActivity) mContext).superBackPressed();
}
}
}

View File

@ -27,6 +27,7 @@ import com.yunbao.live.bean.LiveBean;
import com.yunbao.live.http.LiveHttpUtil;
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
import com.yunbao.main.R;
import com.yunbao.common.event.CloseEvent;
import com.yunbao.main.event.JumpUserHomeEvent;
import com.yunbao.main.fragment.SearchRecommendFragment;
import com.yunbao.main.fragment.SearchResultsFragment;
@ -214,4 +215,12 @@ public class SearchActivity extends AbsActivity {
transaction.commit();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onClose(CloseEvent event) {
if (!isFinishing()) {
finish();
}
}
}