合并 fix bugs
This commit is contained in:
@@ -23,7 +23,7 @@ public class UserInfo extends BaseEvent implements Serializable {
|
||||
public static final String FEMALE = "2";
|
||||
public static final String MALE = "1";
|
||||
private int id;
|
||||
private int user_id; //用户id
|
||||
private int user_id = 0; //用户id
|
||||
private String user_code;//用户id码
|
||||
private String avatar;//头像
|
||||
private String nickname;//昵称
|
||||
|
||||
@@ -28,13 +28,21 @@ public class RoomPitBean implements Serializable {
|
||||
* dress_picture :
|
||||
*/
|
||||
|
||||
public RoomPitBean(){
|
||||
|
||||
}
|
||||
|
||||
public RoomPitBean(String pit_number){
|
||||
this.pit_number = pit_number;
|
||||
}
|
||||
|
||||
private String id;//id
|
||||
private String pit_number="";//麦位号
|
||||
private String state;//麦位状态 正常 ,1封麦;3禁麦
|
||||
private int is_lock;//0未锁麦 1锁麦
|
||||
private int is_mute;//0未禁麦 1禁麦
|
||||
private int count_down;//麦位倒计时
|
||||
private String user_id="";//麦位上用户id
|
||||
private String user_id="0";//麦位上用户id
|
||||
private String nickname;//麦位上用户昵称
|
||||
private String avatar;//用户头像
|
||||
private String sex;//性别
|
||||
|
||||
@@ -65,7 +65,12 @@ public final class DataLogger implements DataLoggingInterceptor.Logger {
|
||||
if (message.startsWith(DataLoggingInterceptor.sLogEndFlag)) {
|
||||
if (mMessage.toString().contains("Xintiao/keep_xintiao"))
|
||||
return;
|
||||
try {
|
||||
LogUtils.d(mMessage.toString());
|
||||
} catch (StringIndexOutOfBoundsException e) {
|
||||
// 处理异常,记录日志或使用默认值
|
||||
LogUtils.e("打印 JSON 数据时出错:" + e.getMessage());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,8 +80,11 @@ public final class DataLogger implements DataLoggingInterceptor.Logger {
|
||||
message = formatJson(decodeUnicode(message));
|
||||
}
|
||||
// 追加消息
|
||||
try { mMessage.append(message.concat("\n"));
|
||||
} catch (Exception ignored) {}
|
||||
try {
|
||||
mMessage.append(message.concat("\n"));
|
||||
} catch (Exception ignored) {
|
||||
LogUtils.e("打印 JSON append时出错:" + ignored.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,8 @@ import android.os.Looper;
|
||||
import android.util.Log;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.bean.GiftBean;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
@@ -66,14 +68,14 @@ public class GiftDisplayManager {
|
||||
|
||||
final int finalI = i;
|
||||
displayView.setGiftAnimationListener(view -> {
|
||||
Log.d("GiftDisplayManager", "Gift animation ended on view: " + finalI);
|
||||
LogUtils.e("GiftDisplayManager", "Gift animation ended on view: " + finalI);
|
||||
onGiftAnimationEnd(view);
|
||||
});
|
||||
|
||||
container.addView(displayView);
|
||||
displayViews.add(displayView);
|
||||
|
||||
Log.d("GiftDisplayManager", "Created display view " + i);
|
||||
LogUtils.e("GiftDisplayManager", "Created display view " + i +"____"+displayViews.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +85,7 @@ public class GiftDisplayManager {
|
||||
}
|
||||
if (gift == null) return;
|
||||
|
||||
Log.d("GiftDisplayManager", "Received gift: " + gift.getSenderName() +
|
||||
LogUtils.e("GiftDisplayManager", "Received gift: " + gift.getSenderName() +
|
||||
" - " + gift.getGift_name() + " x" + gift.getNumber());
|
||||
|
||||
mainHandler.post(() -> internalReceiveGift(gift));
|
||||
@@ -99,8 +101,8 @@ public class GiftDisplayManager {
|
||||
GiftBean accumulatedGift = accumulatedGifts.get(key);
|
||||
if (accumulatedGift != null) {
|
||||
accumulatedGift.setNumber(accumulatedGift.getNumber() + gift.getNumber());
|
||||
displayingView.updateGiftCount(accumulatedGift.getNumber());
|
||||
Log.d("GiftDisplayManager", "Gift accumulated: " + gift.getGift_name() +
|
||||
displayingView.updateGiftCount(accumulatedGift);
|
||||
LogUtils.e("GiftDisplayManager", "Gift accumulated: " + gift +
|
||||
" x" + accumulatedGift.getNumber());
|
||||
}
|
||||
} else {
|
||||
@@ -111,11 +113,11 @@ public class GiftDisplayManager {
|
||||
String key = gift.getGiftKey();
|
||||
accumulatedGifts.put(key, gift.clone());
|
||||
availableView.showGift(gift);
|
||||
Log.d("GiftDisplayManager", "Immediately display gift on view: " + availableView.getTag());
|
||||
LogUtils.e("GiftDisplayManager", "Immediately display gift on view: " + gift);
|
||||
} else {
|
||||
// 没有可用视图,加入队列
|
||||
giftQueue.offer(gift);
|
||||
Log.d("GiftDisplayManager", "Added to queue, current queue size: " + giftQueue.size());
|
||||
LogUtils.e("GiftDisplayManager", gift+" Added to queue, current queue size: " + giftQueue.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,12 +148,12 @@ public class GiftDisplayManager {
|
||||
|
||||
private void processGiftQueue() {
|
||||
if (isProcessingQueue) {
|
||||
Log.d("GiftDisplayManager", "Already processing queue, skip");
|
||||
LogUtils.e("GiftDisplayManager", "Already processing queue, skip");
|
||||
return;
|
||||
}
|
||||
|
||||
isProcessingQueue = true;
|
||||
Log.d("GiftDisplayManager", "Start processing queue, size: " + giftQueue.size());
|
||||
LogUtils.e("GiftDisplayManager", "Start processing queue, size: " + giftQueue.size());
|
||||
// 循环处理队列直到队列为空或没有可用视图
|
||||
while (!giftQueue.isEmpty()) {
|
||||
GiftDisplayView availableView = findAvailableDisplayView();
|
||||
@@ -168,16 +170,16 @@ public class GiftDisplayManager {
|
||||
String key = gift.getGiftKey();
|
||||
accumulatedGifts.put(key, gift.clone());
|
||||
availableView.showGift(gift);
|
||||
Log.d("GiftDisplayManager", "Display gift from queue: " + gift.getGift_name());
|
||||
LogUtils.e("GiftDisplayManager", "Display gift from queue: " + gift);
|
||||
} else {
|
||||
// 如果已经在显示,累加到现有视图
|
||||
String key = gift.getGiftKey();
|
||||
GiftBean accumulatedGift = accumulatedGifts.get(key);
|
||||
if (accumulatedGift != null) {
|
||||
accumulatedGift.setNumber(accumulatedGift.getNumber() + gift.getNumber());
|
||||
displayingView.updateGiftCount(accumulatedGift.getNumber());
|
||||
Log.d("GiftDisplayManager", "Queue gift accumulated to existing: " +
|
||||
gift.getNickname() + " x" + accumulatedGift.getNumber());
|
||||
displayingView.updateGiftCount(accumulatedGift);
|
||||
LogUtils.e("GiftDisplayManager", "Queue gift accumulated to existing: " +
|
||||
gift + " x" + accumulatedGift.getNumber());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,18 +188,18 @@ public class GiftDisplayManager {
|
||||
|
||||
// 打印队列状态
|
||||
if (!giftQueue.isEmpty()) {
|
||||
Log.d("GiftDisplayManager", "Still " + giftQueue.size() + " gifts waiting in queue");
|
||||
LogUtils.e("GiftDisplayManager", "Still " + giftQueue.size() + " gifts waiting in queue");
|
||||
}
|
||||
}
|
||||
|
||||
private void onGiftAnimationEnd(GiftDisplayView view) {
|
||||
Log.d("GiftDisplayManager", "Gift animation end on view: " + view.getTag());
|
||||
LogUtils.e("GiftDisplayManager", "Gift animation end on view: " + view.getTag());
|
||||
|
||||
// 从累加记录中移除
|
||||
if (view.getCurrentGift() != null) {
|
||||
String key = view.getCurrentGift().getGiftKey();
|
||||
accumulatedGifts.remove(key);
|
||||
Log.d("GiftDisplayManager", "Removed accumulated record: " + key);
|
||||
LogUtils.e("GiftDisplayManager", "Removed accumulated record: " + key);
|
||||
}
|
||||
|
||||
// 延迟一下再处理队列,确保视图状态完全重置
|
||||
@@ -220,7 +222,7 @@ public class GiftDisplayManager {
|
||||
}
|
||||
|
||||
public void clearAll() {
|
||||
Log.d("GiftDisplayManager", "Clear all gifts and queue");
|
||||
LogUtils.e("GiftDisplayManager", "Clear all gifts and queue");
|
||||
|
||||
for (GiftDisplayView view : displayViews) {
|
||||
view.finishAnimationImmediately();
|
||||
@@ -234,16 +236,16 @@ public class GiftDisplayManager {
|
||||
|
||||
// 调试方法
|
||||
public void printDebugInfo() {
|
||||
Log.d("GiftDisplayManager", "=== Gift Display Manager Status ===");
|
||||
Log.d("GiftDisplayManager", "Queue size: " + giftQueue.size());
|
||||
Log.d("GiftDisplayManager", "Accumulated records: " + accumulatedGifts.size());
|
||||
LogUtils.e("GiftDisplayManager", "=== Gift Display Manager Status ===");
|
||||
LogUtils.e("GiftDisplayManager", "Queue size: " + giftQueue.size());
|
||||
LogUtils.e("GiftDisplayManager", "Accumulated records: " + accumulatedGifts.size());
|
||||
|
||||
for (int i = 0; i < displayViews.size(); i++) {
|
||||
GiftDisplayView view = displayViews.get(i);
|
||||
Log.d("GiftDisplayManager", "View " + i + ": Animating=" + view.isAnimating() +
|
||||
LogUtils.e("GiftDisplayManager", "View " + i + ": Animating=" + view.isAnimating() +
|
||||
", Gift=" + (view.getCurrentGift() != null ? view.getCurrentGift().getGift_name() : "None"));
|
||||
}
|
||||
Log.d("GiftDisplayManager", "===================================");
|
||||
LogUtils.e("GiftDisplayManager", "===================================");
|
||||
}
|
||||
|
||||
private int dpToPx(int dp) {
|
||||
|
||||
@@ -13,6 +13,8 @@ import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.bean.GiftBean;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
@@ -63,14 +65,14 @@ public class GiftDisplayView extends FrameLayout {
|
||||
|
||||
public void showGift(GiftBean gift) {
|
||||
if (isAnimating) {
|
||||
Log.w("GiftDisplayView", "View is animating, cannot show new gift");
|
||||
LogUtils.e("GiftDisplayView", "View is animating, cannot show new gift");
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentGift = gift;
|
||||
this.isAnimating = true;
|
||||
|
||||
Log.d("GiftDisplayView", "Start showing gift: " + gift.getGift_name());
|
||||
LogUtils.e("GiftDisplayView", "Start showing gift: " + gift.getGift_name());
|
||||
|
||||
// 更新UI
|
||||
updateUIWithGift(gift);
|
||||
@@ -87,7 +89,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
Log.d("GiftDisplayView", "Enter animation completed: " + gift.getGift_name());
|
||||
LogUtils.e("GiftDisplayView", "Enter animation completed: " + gift.getGift_name());
|
||||
startHideTimer();
|
||||
}
|
||||
})
|
||||
@@ -113,7 +115,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
// 加载礼物图片
|
||||
loadGiftImage(gift.getBase_image());
|
||||
|
||||
Log.d("GiftDisplayView", "Update UI: " + gift.getSenderName() + " - " +
|
||||
LogUtils.e("GiftDisplayView", "Update UI: " + gift.getSenderName() + " - " +
|
||||
gift.getGift_name() + " x" + gift.getNumber());
|
||||
}
|
||||
|
||||
@@ -150,16 +152,25 @@ public class GiftDisplayView extends FrameLayout {
|
||||
return Color.argb(255, random.nextInt(256), random.nextInt(256), random.nextInt(256));
|
||||
}
|
||||
|
||||
public void updateGiftCount(int count) {
|
||||
public void updateGiftCount(GiftBean gift) {
|
||||
if (!isAnimating) {
|
||||
Log.w("GiftDisplayView", "View is not animating, cannot update count");
|
||||
LogUtils.e("GiftDisplayView", "View is not animating, cannot update count");
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("GiftDisplayView", "Update gift count: " + count);
|
||||
LogUtils.e("GiftDisplayView", "Update gift count: " + gift);
|
||||
|
||||
// 更新数量显示
|
||||
countTextView.setText("x" + count);
|
||||
countTextView.setText("x" + gift.getNumber());
|
||||
|
||||
if (senderTextView.getText().toString().isEmpty()){
|
||||
senderTextView.setText(gift.getNickname()!=null ? gift.getNickname() : "未知用户");
|
||||
}
|
||||
|
||||
if (giftTextView.getText().toString().isEmpty()){
|
||||
giftTextView.setText("送给 "+(gift.getSenderName() != null ? gift.getSenderName() : "未知用户") + (gift.getGift_name() != null ? gift.getGift_name() : "礼物"));
|
||||
}
|
||||
|
||||
|
||||
// 数量更新动画
|
||||
countTextView.animate()
|
||||
@@ -201,7 +212,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
return;
|
||||
}
|
||||
|
||||
Log.d("GiftDisplayView", "Start hide animation: " + currentGift.getGift_name());
|
||||
LogUtils.e("GiftDisplayView", "Start hide animation: " + currentGift.getGift_name());
|
||||
|
||||
// 从右往左消失动画
|
||||
animate()
|
||||
@@ -211,7 +222,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
.setListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
Log.d("GiftDisplayView", "Hide animation completed: " + currentGift.getGift_name());
|
||||
LogUtils.e("GiftDisplayView", "Hide animation completed: " + currentGift.getGift_name());
|
||||
isAnimating = false;
|
||||
|
||||
if (listener != null) {
|
||||
@@ -225,7 +236,7 @@ public class GiftDisplayView extends FrameLayout {
|
||||
}
|
||||
|
||||
public void finishAnimationImmediately() {
|
||||
Log.d("GiftDisplayView", "Finish animation immediately");
|
||||
LogUtils.e("GiftDisplayView", "Finish animation immediately");
|
||||
|
||||
// 移除计时任务
|
||||
if (hideRunnable != null) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/dp_5"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -35,6 +36,7 @@
|
||||
android:layout_marginEnd="-4dp"
|
||||
android:layout_marginTop="-4dp"
|
||||
android:layout_marginBottom="-4dp"
|
||||
android:adjustViewBounds="true"
|
||||
app:layout_constraintStart_toStartOf="@id/riv"
|
||||
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||
app:layout_constraintTop_toTopOf="@id/riv"
|
||||
@@ -45,9 +47,9 @@
|
||||
android:id="@+id/iv_ripple"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:adjustViewBounds="true"
|
||||
app:autoPlay="false"
|
||||
app:layout_constraintHeight_percent="0.95"
|
||||
app:layout_constraintWidth_percent="1"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_frame"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_frame"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_frame"
|
||||
|
||||
@@ -504,11 +504,12 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding?.roomTop?.userRecyclerView?.adapter = likeUserAdapter
|
||||
likeUserAdapter!!.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { adapter, view, position ->
|
||||
// RoomOnlineDialogFragment.show(roomId, "", mRoomUserBean, mRoomInfoResp, getSupportFragmentManager());
|
||||
val fragment = RoomOnlineDialogFragment.show(
|
||||
roomId, "", mRoomUserBean, mRoomInfoResp,
|
||||
supportFragmentManager
|
||||
)
|
||||
|
||||
LogUtils.e("fragment: ${(fragment != null)}")
|
||||
if (fragment != null) {
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
}
|
||||
@@ -902,7 +903,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
AppStateManager.getInstance().roomInfo = resp
|
||||
this.mRoomInfoResp = resp
|
||||
val roomBean = resp.room_info
|
||||
LogUtils.e("setView_mRoomBean", roomBean.toString())
|
||||
LogUtils.e("setView_mRoomBean", resp.toString())
|
||||
this.mRoomUserBean = resp.user_info
|
||||
this.mRoomOwnerBean = resp.room_owner
|
||||
this.roomId = roomBean.room_id
|
||||
@@ -1588,7 +1589,7 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
messageEvent: RoomMessageEvent
|
||||
) {
|
||||
mRoomInfoResp!!.room_info.pit_list[toPitNumber.toInt() - 1] = getPitBean(messageEvent, 2)
|
||||
mRoomInfoResp?.room_info?.pit_list!![fromPitNumber.toInt() - 1] = RoomPitBean()
|
||||
mRoomInfoResp?.room_info?.pit_list!![fromPitNumber.toInt() - 1] = RoomPitBean(fromPitNumber)
|
||||
|
||||
if ("9" == toPitNumber && messageEvent.text.fromUserInfo.user_id == SpUtil.getUserId()) {
|
||||
mRoomInfoResp!!.user_info.pit_number = Integer.parseInt(toPitNumber)
|
||||
@@ -1701,8 +1702,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
val userId = fromUserInfo.user_id
|
||||
val currentUserId = SpUtil.getUserId()
|
||||
|
||||
|
||||
|
||||
if ("9" == pitNumber && userId == currentUserId) {
|
||||
// mBinding!!.roomTop.rl.visibility = View.VISIBLE
|
||||
ivSoundEffects(true)
|
||||
}
|
||||
|
||||
@@ -1748,6 +1750,9 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
mBinding!!.rlMore.visibility = View.GONE
|
||||
mBinding!!.rlMisc.visibility = View.GONE
|
||||
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = getPitBean(messageEvent, 1)
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
|
||||
@@ -1800,15 +1805,17 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
val roomType = RoomType.fromTypeId(typeId)
|
||||
|
||||
|
||||
|
||||
when (roomType) {
|
||||
RoomType.AUCTION -> {
|
||||
if ("9" == pitNumber) {
|
||||
mRoomInfoResp!!.room_info.pit_list[0] = RoomPitBean(pitNumber)
|
||||
if (userId == currentUserId) {
|
||||
if (mRoomInfoResp!!.user_info != null) {
|
||||
mRoomInfoResp!!.user_info.pit_number = 0
|
||||
}
|
||||
}
|
||||
} else if ("888" == pitNumber) {
|
||||
} else if ("888" == pitNumber) {//被拍者
|
||||
mRoomInfoResp!!.room_auction = null
|
||||
if (userId == currentUserId) {
|
||||
setRoleType(0, 0)
|
||||
@@ -1819,16 +1826,26 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
}
|
||||
|
||||
RoomType.DATING -> {
|
||||
//TODO 下麦更换数据
|
||||
val labelId = mRoomInfoResp!!.room_info.label_id
|
||||
if ("1" == labelId) {
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = RoomPitBean(pitNumber)
|
||||
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
if (mRoomInfoResp!!.user_info.user_id == SpUtil.getUserId()) {
|
||||
ivSoundEffects(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
RoomType.MUTUAL_ENTERTAINMENT -> {
|
||||
mRoomInfoResp?.room_info?.pit_list!![pitNumber.toInt() - 1] = RoomPitBean(pitNumber)
|
||||
|
||||
else -> {}
|
||||
roomFragment!!.upRoomInfoData(mRoomInfoResp)
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
else -> {
|
||||
roomFragment!!.updateSeatViewExchangedWithPitArray(mRoomInfoResp)
|
||||
}
|
||||
}
|
||||
roomFragment!!.handleRoomMessage(messageEvent)
|
||||
}
|
||||
@@ -2505,8 +2522,10 @@ class RoomActivity : BaseMvpActivity<RoomPresenter?, ActivityRoomBinding?>(),
|
||||
val fragment = RoomPkDialogFragment.newInstance(
|
||||
roomId,
|
||||
SpUtil.getUserId().toString() + "",
|
||||
mRoomInfoResp!!.room_info.is_pk
|
||||
mRoomInfoResp?.room_info?.is_pk!!
|
||||
)
|
||||
|
||||
LogUtils.e("pk_info","id == R.id.rl_more ${mRoomInfoResp?.room_info?.is_pk!!}")
|
||||
fragment.show(supportFragmentManager, "RoomPkDialogFragment")
|
||||
addActiveDialogFragment(fragment) // 添加到管理列表
|
||||
} else if (id == R.id.rl_message) {
|
||||
|
||||
@@ -346,6 +346,7 @@ public class ChatRoomFragment extends BaseMvpFragment<ChatRoomPresenter, RoomFra
|
||||
mBinding.tvTabUser.setTextSize(12);
|
||||
} else if (view_id == R.id.tv_count) {
|
||||
mBinding.recycleViewPublic.scrollToPosition(easeChatAdapter.getItemCount() - 1);
|
||||
isBottom = true;
|
||||
mBinding.tvCount.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -239,13 +239,10 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||
if (roomPitBean.getPit_number().equals("7") || roomPitBean.getPit_number().equals("8")) {
|
||||
if (i == 6 || i == 7) {
|
||||
continue;
|
||||
}
|
||||
if (Integer.parseInt(!roomPitBean.getPit_number().isEmpty() ? roomPitBean.getPit_number() : "0") > 10) {
|
||||
continue;
|
||||
}
|
||||
RoomFriendshipWheatView object = mWheatViews.get(Integer.parseInt(roomPitBean.getPit_number()) - 1);
|
||||
RoomFriendshipWheatView object = mWheatViews.get(i);
|
||||
if (object != null) {
|
||||
object.setData(roomPitBean);
|
||||
}
|
||||
@@ -492,21 +489,15 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
}
|
||||
|
||||
public void event1035(RoomMessageEvent message) {
|
||||
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
if (i == 6 || i == 7)
|
||||
continue;
|
||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||
if (roomPitBean.getPit_number().equals("7") || roomPitBean.getPit_number().equals("8")) {
|
||||
continue;
|
||||
}
|
||||
if (Integer.parseInt(!roomPitBean.getPit_number().isEmpty() ? roomPitBean.getPit_number() : "0") > 10) {
|
||||
continue;
|
||||
}
|
||||
RoomFriendshipWheatView object = mWheatViews.get(Integer.parseInt(roomPitBean.getPit_number()) - 1);
|
||||
if (Integer.parseInt(roomPitBean.getUser_id()) == message.getText().getFromUserInfo().getUser_id()){
|
||||
RoomFriendshipWheatView object = mWheatViews.get(i);
|
||||
if (object != null) {
|
||||
object.setData(roomPitBean);
|
||||
break;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -931,14 +922,11 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
||||
roomInfoResp = resp;
|
||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||
if (i == 6 || i == 7) {
|
||||
continue;
|
||||
}
|
||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||
if (roomPitBean.getPit_number().equals("7") || roomPitBean.getPit_number().equals("8")) {
|
||||
continue;
|
||||
}
|
||||
if (Integer.parseInt(!roomPitBean.getPit_number().isEmpty() ? roomPitBean.getPit_number() : "0") > 10) {
|
||||
continue;
|
||||
}
|
||||
RoomFriendshipWheatView object = mWheatViews.get(Integer.parseInt(roomPitBean.getPit_number()) - 1);
|
||||
RoomFriendshipWheatView object = mWheatViews.get(i);
|
||||
if (object != null) {
|
||||
object.setData(roomPitBean);
|
||||
}
|
||||
|
||||
@@ -229,8 +229,13 @@ public class VocalRangeFragment extends BaseMvpFragment<MePresenter, FragmentVoc
|
||||
startActivity(new Intent(getContext(), MyBagActivity.class));
|
||||
} else if (id==R.id.me_daily) {//每日任务
|
||||
startActivity(new Intent(getContext(), DailyTasksActivity.class));
|
||||
<<<<<<< HEAD
|
||||
} else if (id == R.id.iv_sz) {//设置
|
||||
// startActivity(new Intent(getContext(), SettingActivity.class));
|
||||
=======
|
||||
}
|
||||
else if (id == R.id.iv_sz) {//设置
|
||||
>>>>>>> branch_new_dev
|
||||
Intent intent = new Intent(getContext(), SettingActivity.class);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable("userInfo", userInfo);
|
||||
|
||||
@@ -8,11 +8,17 @@ import com.xscm.moduleutil.bean.WalletConfig;
|
||||
import com.xscm.moduleutil.http.BaseObserver;
|
||||
import com.xscm.moduleutil.presenter.BasePresenter;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class CurrencyExchangePresenter extends BasePresenter<CurrencyExchangeConacts.View> implements CurrencyExchangeConacts.IMePre {
|
||||
|
||||
CurrencyExchangeConacts.View mView;
|
||||
|
||||
public CurrencyExchangePresenter(CurrencyExchangeConacts.View view, Context context) {
|
||||
super(view, context);
|
||||
this.mView = view;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -25,6 +31,9 @@ public class CurrencyExchangePresenter extends BasePresenter<CurrencyExchangeCon
|
||||
|
||||
@Override
|
||||
public void onNext(String s) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().exchangeCoin(s);
|
||||
}
|
||||
});
|
||||
@@ -40,6 +49,9 @@ public class CurrencyExchangePresenter extends BasePresenter<CurrencyExchangeCon
|
||||
|
||||
@Override
|
||||
public void onNext(WalletBean walletBean) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().wallet(walletBean);
|
||||
}
|
||||
});
|
||||
@@ -55,6 +67,9 @@ public class CurrencyExchangePresenter extends BasePresenter<CurrencyExchangeCon
|
||||
|
||||
@Override
|
||||
public void onNext(WalletConfig walletConfig) {
|
||||
if (MvpRef == null) {
|
||||
MvpRef = new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getWalletConfig(walletConfig);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -123,6 +123,10 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
if (userInfo != null) {
|
||||
LogUtils.e("RoomGiftDialogFragment_userInfo", userInfo.toString());
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> branch_new_dev
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -241,7 +245,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
List<RoomPitBean> pitList2 = new ArrayList<>();
|
||||
List<RoomPitBean> pitList3 = new ArrayList<>();
|
||||
List<String> added = new ArrayList<>();
|
||||
if (roomInfoResp.getSong_pit_list() != null && roomInfoResp.getSong_pit_list().size() > 0) {
|
||||
if (roomInfoResp.getSong_pit_list() != null && !roomInfoResp.getSong_pit_list().isEmpty()) {
|
||||
pitList2.addAll(roomInfoResp.getSong_pit_list());
|
||||
// 使用 HashSet 进行去重
|
||||
Set<RoomPitBean> uniquePitSet = new HashSet<>(pitList);
|
||||
@@ -252,7 +256,7 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
}
|
||||
|
||||
if (roomInfoResp.getRoom_auction() != null) {
|
||||
if (roomInfoResp.getRoom_auction().getAuction_list() != null && roomInfoResp.getRoom_auction().getAuction_list().size() > 0) {
|
||||
if (roomInfoResp.getRoom_auction().getAuction_list() != null && !roomInfoResp.getRoom_auction().getAuction_list().isEmpty()) {
|
||||
for (int i = 0; i < roomInfoResp.getRoom_auction().getAuction_list().size(); i++) {
|
||||
RoomAuction.AuctionListBean auctionListBean = roomInfoResp.getRoom_auction().getAuction_list().get(i);
|
||||
RoomPitBean pitBean = new RoomPitBean();
|
||||
@@ -286,9 +290,10 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// 优先添加指定麦位
|
||||
for (String targetPit : priorityPits) {
|
||||
for (RoomPitBean bean : pitList) {
|
||||
if (bean.getPit_number().equals(targetPit) &&
|
||||
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
||||
!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (bean.getPit_number().equals(targetPit)
|
||||
&& !bean.getUser_id().isEmpty()
|
||||
&& !bean.getUser_id().equals("0")
|
||||
&& !bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||
rewardUserBean.setUser_id(bean.getUser_id());
|
||||
@@ -305,9 +310,10 @@ public class RoomGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPres
|
||||
// 添加剩余的
|
||||
for (RoomPitBean bean : pitList) {
|
||||
String pitNumber = bean.getPit_number();
|
||||
if (!added.contains(pitNumber) &&
|
||||
!bean.getUser_id().equals("0") && !bean.getUser_id().equals("") &&
|
||||
!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
if (!added.contains(pitNumber)
|
||||
&& !bean.getUser_id().isEmpty()
|
||||
&&!bean.getUser_id().equals("0")
|
||||
&&!bean.getUser_id().equals(SpUtil.getUserId() + "")) {
|
||||
|
||||
RewardUserBean rewardUserBean = new RewardUserBean();
|
||||
rewardUserBean.setUser_id(bean.getUser_id());
|
||||
|
||||
@@ -77,10 +77,7 @@ public class RoomOnlineDialogFragment extends BaseMvpDialogFragment<RoomPresente
|
||||
// 设置固定高度为 500dp
|
||||
int screenHeight = getResources().getDisplayMetrics().heightPixels;
|
||||
int heightInDp = (int) (screenHeight * 0.6f);
|
||||
;
|
||||
// int heightInPx = (int) (heightInDp * getResources().getDisplayMetrics().density);
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, heightInDp);
|
||||
|
||||
// 可选:设置动画样式(从底部弹出)
|
||||
window.setWindowAnimations(com.xscm.moduleutil.R.style.CommonShowDialogBottom);
|
||||
}
|
||||
|
||||
@@ -92,10 +92,9 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/user_recyclerView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_27"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:overScrollMode="never"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
tools:listitem="@layout/item_like_user"/>
|
||||
|
||||
<TextView
|
||||
@@ -114,10 +113,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btn_close_live"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_width="wrap_content"
|
||||
android:padding="@dimen/dp_4"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:src="@mipmap/room_colse" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -119,7 +119,6 @@ android {
|
||||
// 获取当前时间戳(格式:yyyyMMddHHmmss)
|
||||
def buildTimes = new Date().format("yyyy-MM-dd")
|
||||
def fileName = "羽声_${versionName}_${versionCode}_${buildTimes}.apk"
|
||||
// def fileName = "羽声_${buildTimes}.apk"
|
||||
output.outputFileName = fileName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ isBuildModule=false
|
||||
android.injected.testOnly=false
|
||||
|
||||
APP_VERSION_NAME=1.0.6.4
|
||||
APP_VERSION_NAME=1.0.6.5
|
||||
APP_VERSION_CODE=54
|
||||
|
||||
org.gradle.jvm.toolchain.useLegacyAdapters=false
|
||||
|
||||
Reference in New Issue
Block a user