恢复新人特惠代码,从banner进直播间需要打开新人特惠
This commit is contained in:
parent
a4c56c7e28
commit
30902825d6
@ -32,8 +32,10 @@ import com.opensource.svgaplayer.SVGAParser;
|
|||||||
import com.opensource.svgaplayer.SVGAVideoEntity;
|
import com.opensource.svgaplayer.SVGAVideoEntity;
|
||||||
import com.yunbao.common.CommonAppConfig;
|
import com.yunbao.common.CommonAppConfig;
|
||||||
import com.yunbao.common.Constants;
|
import com.yunbao.common.Constants;
|
||||||
|
import com.yunbao.common.bean.NewPeopleInfo;
|
||||||
import com.yunbao.common.event.MessageIMEvent;
|
import com.yunbao.common.event.MessageIMEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
|
import com.yunbao.common.http.API;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
import com.yunbao.common.http.HttpClient;
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
@ -60,6 +62,9 @@ import org.greenrobot.eventbus.ThreadMode;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by cxf on 2018/10/9.
|
* Created by cxf on 2018/10/9.
|
||||||
* 观众直播间逻辑
|
* 观众直播间逻辑
|
||||||
@ -458,7 +463,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
*/
|
*/
|
||||||
public void openNewPeopleDialog() {
|
public void openNewPeopleDialog() {
|
||||||
if (newPeopleUrl == null) {
|
if (newPeopleUrl == null) {
|
||||||
// getNewPeopleInfo(true);
|
getNewPeopleInfo(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
@ -474,6 +479,30 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
liveHDDialogFragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getNewPeopleInfo(boolean show) {
|
||||||
|
API.get().pdLiveApi(mContext)
|
||||||
|
.getNewPeopleInfo()
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
.subscribe(stringResponseModel -> {
|
||||||
|
NewPeopleInfo peopleInfo = stringResponseModel.getData().getInfo();
|
||||||
|
if (peopleInfo.getIsShow()) {
|
||||||
|
liveNewPeople.setVisibility(View.VISIBLE);
|
||||||
|
if (peopleInfo.getLink().startsWith("http")) {
|
||||||
|
newPeopleUrl = peopleInfo.getLink() + "?";
|
||||||
|
} else {
|
||||||
|
newPeopleUrl = CommonAppConfig.HOST + "/" + peopleInfo.getLink();
|
||||||
|
}
|
||||||
|
setUserPreferentialRedDot(peopleInfo.getShowRed() == 1);
|
||||||
|
if (show) {
|
||||||
|
openNewPeopleDialog();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
liveNewPeople.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
}, Throwable::printStackTrace).isDisposed();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 观众打开主播的整蛊惑单窗口
|
* 观众打开主播的整蛊惑单窗口
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user