修复开播通知可能出现两天的情况

修复svga可能只播放一次的情况
This commit is contained in:
zlzw 2024-08-02 14:49:28 +08:00
parent f7db0b0768
commit 40ba4b8aa8
5 changed files with 27 additions and 22 deletions

View File

@ -74,7 +74,7 @@ public class SVGAViewUtils {
SVGA_CACHE.clear();
}
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) {
playEndClear(svga, isClear,null);

View File

@ -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() {
@Override
public void onSuccess(int code, String msg, final String[] info) {
isHttpBack = false;
if (code == 0 && info.length > 0) {
L.e("开播", "createRoom------->" + info[0]);
isHttpBack = false;
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
UserBean u = appConfig.getUserBean();
((LiveRyAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);

View File

@ -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() {
@Override
public void onSuccess(int code, String msg, final String[] info) {
isHttpBack = false;
if (code == 0 && info.length > 0) {
L.e("开播", "createRoom------->" + info[0]);
isHttpBack = false;
final CommonAppConfig appConfig = CommonAppConfig.getInstance();
UserBean u = appConfig.getUserBean();
((LiveSwAnchorActivity) mContext).startLiveSuccess(info[0], mLiveType, mLiveTypeVal);

View File

@ -1233,8 +1233,8 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private void notifyLiveFlot() {
if (startListNotifyList.iterator().hasNext()) {
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
startListNotifyList.remove(bean);
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
if (startListNotifyList.iterator().hasNext()) {
notifyLiveFlot();
}
@ -1648,6 +1648,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
});
}
private void initLogUpdate() {
LiveNetManager.get(mContext)
.getLogUpdateStatus("1", new com.yunbao.common.http.base.HttpCallback<QiniuLog>() {

View File

@ -33,10 +33,12 @@ import java.util.List;
@Route(path = RouteUtil.PATH_COMMUNITY_Activity)
public class MainHomeCommunityActivity extends AbsActivity {
private List<AnchorStartLiveBean> startListNotifyList = new ArrayList<>();
@Override
protected int getLayoutId() {
return R.layout.activity_main_home_community;
}
@Override
protected void main() {
EventBus.getDefault().register(this);
@ -63,6 +65,7 @@ public class MainHomeCommunityActivity extends AbsActivity {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onNotifyAnchorLive(AnchorStartLiveBean bean) {
if (!IMLoginManager.get(mContext).isLiveNotifySettings()) return;
@ -74,11 +77,12 @@ public class MainHomeCommunityActivity extends AbsActivity {
startListNotifyList.add(bean);
}
}
private void notifyLiveFlot() {
if (startListNotifyList.iterator().hasNext()) {
AnchorStartLiveBean bean = startListNotifyList.iterator().next();
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
startListNotifyList.remove(bean);
new AnchorStartLiveNotifyDialog(mContext, bean).setOnDismissListener(dialog -> {
if (startListNotifyList.iterator().hasNext()) {
notifyLiveFlot();
}