修复关闭小窗时部分机型闪退问题

修复热度加gif不播放问题
修复送礼主播会闪退问题(心愿单id冲突)
修复一处PK中的空指针问题
修复滑动直播间不显示离开图
This commit is contained in:
zlzw 2022-11-15 10:10:28 +08:00
parent 574d93d608
commit 5f210af804
8 changed files with 41 additions and 20 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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为空" );
}
}
}

View File

@ -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());

View File

@ -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<String> 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);
}
}
//判断是否有连麦要显示连麦窗口

View File

@ -372,7 +372,7 @@
android:src="@mipmap/live_icon_wishlist" />
<ViewFlipper
android:id="@+id/wish_list"
android:id="@+id/wish_list_vf"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginStart="6dp"