修复开播通知可能出现两天的情况
修复svga可能只播放一次的情况
This commit is contained in:
parent
f7db0b0768
commit
40ba4b8aa8
@ -74,7 +74,7 @@ public class SVGAViewUtils {
|
|||||||
SVGA_CACHE.clear();
|
SVGA_CACHE.clear();
|
||||||
}
|
}
|
||||||
public static void playEndClear(SVGAImageView svga, boolean isClear, SVGACallback callback) {
|
public static void playEndClear(SVGAImageView svga, boolean isClear, SVGACallback callback) {
|
||||||
playEndClear(svga, isClear,1, null);
|
playEndClear(svga, isClear,0, null);
|
||||||
}
|
}
|
||||||
public static void playEndClear(SVGAImageView svga, boolean isClear) {
|
public static void playEndClear(SVGAImageView svga, boolean isClear) {
|
||||||
playEndClear(svga, isClear,null);
|
playEndClear(svga, isClear,null);
|
||||||
|
@ -944,9 +944,9 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, IMLoginManager.get(mContext).getSelectClarity() + 1, false, new HttpCallback() {
|
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, IMLoginManager.get(mContext).getSelectClarity() + 1, false, new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, final String[] info) {
|
public void onSuccess(int code, String msg, final String[] info) {
|
||||||
|
isHttpBack = false;
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
L.e("开播", "createRoom------->" + info[0]);
|
L.e("开播", "createRoom------->" + info[0]);
|
||||||
isHttpBack = false;
|
|
||||||
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
UserBean u = appConfig.getUserBean();
|
UserBean u = appConfig.getUserBean();
|
||||||
((LiveRyAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
|
((LiveRyAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
|
||||||
|
@ -926,9 +926,9 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
|
|||||||
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, IMLoginManager.get(mContext).getSelectClarity() + 1, true, new HttpCallback() {
|
LiveHttpUtil.newcreateRoom(title, mLiveClassID, mLiveType, mLiveTypeVal, mAvatarFile, IMLoginManager.get(mContext).getSelectClarity() + 1, true, new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, final String[] info) {
|
public void onSuccess(int code, String msg, final String[] info) {
|
||||||
|
isHttpBack = false;
|
||||||
if (code == 0 && info.length > 0) {
|
if (code == 0 && info.length > 0) {
|
||||||
L.e("开播", "createRoom------->" + info[0]);
|
L.e("开播", "createRoom------->" + info[0]);
|
||||||
isHttpBack = false;
|
|
||||||
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
|
||||||
UserBean u = appConfig.getUserBean();
|
UserBean u = appConfig.getUserBean();
|
||||||
((LiveSwAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
|
((LiveSwAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);
|
||||||
|
@ -1233,8 +1233,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
private void notifyLiveFlot() {
|
private void notifyLiveFlot() {
|
||||||
if (startListNotifyList.iterator().hasNext()) {
|
if (startListNotifyList.iterator().hasNext()) {
|
||||||
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
||||||
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
|
|
||||||
startListNotifyList.remove(bean);
|
startListNotifyList.remove(bean);
|
||||||
|
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
|
||||||
if (startListNotifyList.iterator().hasNext()) {
|
if (startListNotifyList.iterator().hasNext()) {
|
||||||
notifyLiveFlot();
|
notifyLiveFlot();
|
||||||
}
|
}
|
||||||
@ -1648,6 +1648,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initLogUpdate() {
|
private void initLogUpdate() {
|
||||||
LiveNetManager.get(mContext)
|
LiveNetManager.get(mContext)
|
||||||
.getLogUpdateStatus("1", new com.yunbao.common.http.base.HttpCallback<QiniuLog>() {
|
.getLogUpdateStatus("1", new com.yunbao.common.http.base.HttpCallback<QiniuLog>() {
|
||||||
|
@ -33,10 +33,12 @@ import java.util.List;
|
|||||||
@Route(path = RouteUtil.PATH_COMMUNITY_Activity)
|
@Route(path = RouteUtil.PATH_COMMUNITY_Activity)
|
||||||
public class MainHomeCommunityActivity extends AbsActivity {
|
public class MainHomeCommunityActivity extends AbsActivity {
|
||||||
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutId() {
|
protected int getLayoutId() {
|
||||||
return R.layout.activity_main_home_community;
|
return R.layout.activity_main_home_community;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
EventBus.getDefault().register(this);
|
EventBus.getDefault().register(this);
|
||||||
@ -63,6 +65,7 @@ public class MainHomeCommunityActivity extends AbsActivity {
|
|||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
EventBus.getDefault().unregister(this);
|
EventBus.getDefault().unregister(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onNotifyAnchorLive(AnchorStartLiveBean bean) {
|
public void onNotifyAnchorLive(AnchorStartLiveBean bean) {
|
||||||
if (!IMLoginManager.get(mContext).isLiveNotifySettings()) return;
|
if (!IMLoginManager.get(mContext).isLiveNotifySettings()) return;
|
||||||
@ -74,11 +77,12 @@ public class MainHomeCommunityActivity extends AbsActivity {
|
|||||||
startListNotifyList.add(bean);
|
startListNotifyList.add(bean);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyLiveFlot() {
|
private void notifyLiveFlot() {
|
||||||
if (startListNotifyList.iterator().hasNext()) {
|
if (startListNotifyList.iterator().hasNext()) {
|
||||||
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
|
||||||
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
|
|
||||||
startListNotifyList.remove(bean);
|
startListNotifyList.remove(bean);
|
||||||
|
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
|
||||||
if (startListNotifyList.iterator().hasNext()) {
|
if (startListNotifyList.iterator().hasNext()) {
|
||||||
notifyLiveFlot();
|
notifyLiveFlot();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user