This commit is contained in:
18401019693 2022-10-13 11:10:29 +08:00
parent db1940c571
commit 8d0af1a06e
4 changed files with 38 additions and 21 deletions

View File

@ -4,15 +4,15 @@ ext {
buildToolsVersion: "28.0.3",
minSdkVersion : 21,
targetSdkVersion : 31,
versionCode : 217,
versionName : "6.4.2"
versionCode : 218,
versionName : "6.4.3"
]
manifestPlaceholders = [
//
// serverHost : "https://napi.yaoulive.com",
serverHost : "https://napi.yaoulive.com",
//
serverHost : "https://ceshi.yaoulive.com",
// serverHost : "https://ceshi.yaoulive.com",
//
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",

View File

@ -348,13 +348,15 @@ public class LiveAudienceActivity extends LiveActivity {
setIntent(intent);
}
}
public void openSignWindow(String icon,String name,String desc){
SignDialogFragment fragment=new SignDialogFragment();
public void openSignWindow(String icon, String name, String desc) {
SignDialogFragment fragment = new SignDialogFragment();
fragment.setDesc(desc);
fragment.setName(name);
fragment.setIcon(icon);
fragment.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "SignWindow");
}
/**
* 打开礼物窗口
*/
@ -1023,4 +1025,16 @@ public class LiveAudienceActivity extends LiveActivity {
});
}
public void closeRoom() {
runOnUiThread(new Runnable() {
@Override
public void run() {
if (manager != null) {
manager.onRemove(true);
}
}
});
}
}

View File

@ -1,12 +1,12 @@
package com.yunbao.live.dialog;
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
import android.Manifest;
import android.app.ActionBar;
import android.app.Dialog;
import android.graphics.Color;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
@ -14,6 +14,9 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yunbao.common.CommonAppConfig;
@ -41,13 +44,12 @@ import org.greenrobot.eventbus.EventBus;
import java.util.ArrayList;
import java.util.List;
import io.rong.imkit.IMCenter;
import io.rong.imlib.IRongCallback;
import io.rong.imlib.RongIMClient;
import io.rong.imlib.model.Conversation;
import io.rong.message.TextMessage;
import static com.yunbao.live.views.LivePlayRyViewHolder.Micing;
/**
* 连麦列表
*/
@ -204,7 +206,8 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
apply_btn.setText(R.string.cancel_application);
Micing = 1;
dismiss();
io.rong.imlib.model.Message ids[] = {message};
RongIMClient.getInstance().deleteRemoteMessages(conversationType,message.getTargetId(),ids, null);
liveImDeletUtil.deleteMessages(message.getTargetId(), message.getMessageId());
}
@ -249,7 +252,8 @@ public class LiveMicUserDialogFragment extends AbsDialogFragment implements View
Log.e("ry", "发送成功");
Micing = 0;
dismiss();
io.rong.imlib.model.Message ids[] = {message};
RongIMClient.getInstance().deleteRemoteMessages(conversationType,message.getTargetId(),ids, null);
liveImDeletUtil.deleteMessages(message.getTargetId(), message.getMessageId());
}

View File

@ -11,7 +11,6 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
@ -459,10 +458,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
Log.e("ry", "发送成功");
liveImDeletUtil.deleteMessages(message.getTargetId(), message.getMessageId());
if (isBackPressed) {
((LiveAudienceActivity) mContext).onBackPressed();
((LiveAudienceActivity)mContext).closeRoom();
} else {
EventBus.getDefault().post(new LiveRoomChangeEvent(bean, liveType, liveTypeVal));
}
io.rong.imlib.model.Message ids[] = {message};
RongIMClient.getInstance().deleteRemoteMessages(conversationType, message.getTargetId(), ids, null);
}
@Override
@ -520,13 +521,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onSuccess() {
Log.e("ry", "退出多人房间成功");
new Handler(Looper.getMainLooper()).post(new Runnable() {
public void run() {
Micing = 0;
}
});
if (isBackPressed) {
((LiveAudienceActivity) mContext).onBackPressed();
Micing = 0;
((LiveAudienceActivity)mContext).closeRoom();
} else {
EventBus.getDefault().post(new LiveRoomChangeEvent(bean, liveType, liveTypeVal));
}
@ -1602,7 +1600,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.starChallengeUpgradeNotify(msgModel);
}
}
public void messageBottom(){
public void messageBottom() {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.chatScrollToBottom();
}