diff --git a/common/src/main/java/com/yunbao/common/dialog/HintDialog.java b/common/src/main/java/com/yunbao/common/dialog/HintDialog.java index a4ec14280..a7bdd8b35 100644 --- a/common/src/main/java/com/yunbao/common/dialog/HintDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/HintDialog.java @@ -7,6 +7,11 @@ import android.view.Window; import android.view.WindowManager; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + import com.yunbao.common.R; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.DpUtil; @@ -77,6 +82,15 @@ public class HintDialog extends AbsDialogFragment { } + @Override + public void show(@NonNull FragmentManager manager, @Nullable String tag) { + try { + super.show(manager, tag); + } catch (Exception e) { + e.printStackTrace(); + } + } + private HintListener listener; public HintDialog setListener(HintListener listener) { diff --git a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java index 3c26b148e..0f951c0cf 100644 --- a/common/src/main/java/com/yunbao/common/glide/ImgLoader.java +++ b/common/src/main/java/com/yunbao/common/glide/ImgLoader.java @@ -72,7 +72,6 @@ public class ImgLoader { .load(url) .thumbnail(thumbnail) - .dontAnimate() .placeholder(imageView.getDrawable()); if (width != -1 && height != -1) { builder = builder.override(width, height); diff --git a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java index fe5286d6e..88ae20e94 100644 --- a/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java +++ b/common/src/main/java/com/yunbao/common/views/weight/LiveFloatView.java @@ -25,10 +25,14 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.RouteUtil; +import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.floatingview.APPEasyFloat; import com.yunbao.common.views.floatingview.FloatingMagnetView; import com.yunbao.common.views.floatingview.MagnetViewListener; +import java.lang.ref.WeakReference; +import java.util.List; + import kotlin.Unit; import kotlin.jvm.functions.Function1; diff --git a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java index 22538594a..8e30e6430 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveActivity.java @@ -159,7 +159,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL EventBus.getDefault().register(this); mDialogFragmentSet = new HashSet<>(); //解压 美颜模型 - try { + /*try { CommonAppConfig.VIDEO_TIE_MODEl_PATH = getFilesDir().getAbsolutePath() + "/model";//app安装路径 File model = new File(CommonAppConfig.VIDEO_TIE_MODEl_PATH); if (model.exists() && Objects.requireNonNull(model.listFiles()).length > 0) { @@ -169,7 +169,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL } catch (Exception e) { e.printStackTrace(); Log.i("log", "beauty e=" + e); - } + }*/ } @Override diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 6cb178c5a..8844d6818 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -525,18 +525,22 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { //1. 设置自适应合流布局模式 config.setLayoutMode(RCRTCMixConfig.MixLayoutMode.ADAPTIVE); //2. 合流画布设置 - rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() { - @Override - public void onSuccess() { - Log.e("ry", "混成功" + u.getId()); - } + if(rcrtcLiveInfo!=null) { + rcrtcLiveInfo.setMixConfig(config, new IRCRTCResultCallback() { + @Override + public void onSuccess() { + Log.e("ry", "混成功" + u.getId()); + } - @Override - public void onFailed(RTCErrorCode errorCode) { - Log.e("ry", "混失败" + errorCode); + @Override + public void onFailed(RTCErrorCode errorCode) { + Log.e("ry", "混失败" + errorCode); - } - }); + } + }); + }else{ + Log.w("PkDebug", "PK合流失败,rcrtcLiveInfo为空" ); + } } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index f667d1f5b..1b8fb54f7 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1405,7 +1405,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis wishListLayout.setVisibility(View.GONE); } ((Activity) mContext).runOnUiThread(() -> { - wishListFlipper = (ViewFlipper) findViewById(R.id.wish_list); + wishListFlipper = (ViewFlipper) findViewById(R.id.wish_list_vf); for (int i = 0; i < wishlist.size(); i++) { View wish = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null); wish.setTag(wishlist.get(i).getId()); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 67b717693..97f534fd2 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -172,6 +172,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe private boolean mCoinNotEnough;//余额不足 private boolean mFirstConnectSocket;//是否是第一次连接成功socket private int liveBg = -1; + private int leave=-1;//是否正在休息 1为休息 0为直播 private LiveImDeletUtil liveImDeletUtil; private List greetings = new ArrayList<>(); private Handler liveHandler = new Handler(); @@ -1069,7 +1070,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mChatLevel = obj.getIntValue("speak_limit"); mDanMuLevel = obj.getIntValue("barrage_limit"); liveBg = obj.getIntValue("live_bg"); - + leave = obj.getInteger("isleave"); if (obj.containsKey("greetings")) { greetings = JSONArray.parseArray(obj.getJSONArray("greetings").toJSONString(), String.class); } @@ -1197,10 +1198,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRoomViewHolder.startRequestTimeCharge(); } } - - if (TextUtils.equals(obj.getString("isleave"), "1")) { - if (LivePlayKsyViewHolder.leave != null) { - LivePlayKsyViewHolder.leave.setVisibility(View.VISIBLE); + if (leave==1) { + if (LivePlayRyViewHolder.leave != null) { + LivePlayRyViewHolder.leave.setVisibility(View.VISIBLE); } } //判断是否有连麦,要显示连麦窗口 diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 8d27fe65f..cf6805f4f 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -372,7 +372,7 @@ android:src="@mipmap/live_icon_wishlist" />