国际化:未被批量替换的简体中文改为繁体
This commit is contained in:
@@ -100,13 +100,13 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
) {
|
||||
tvSelectedStatus.text =
|
||||
if (AvRoomDataManager.get().isDatingVipMic(it.selectMicPosition)
|
||||
) ResUtil.getString(R.string.avroom_adapter_datingmicroviewadapter_01) else "选${it.selectMicPosition + 1}号"
|
||||
) ResUtil.getString(R.string.avroom_adapter_datingmicroviewadapter_01) else "選${it.selectMicPosition + 1}號"
|
||||
} else {
|
||||
tvSelectedStatus.text = "已选择"
|
||||
tvSelectedStatus.text = "已選擇"
|
||||
}
|
||||
} else {
|
||||
tvSelectedStatus.isSelected = false
|
||||
tvSelectedStatus.text = "未选择"
|
||||
tvSelectedStatus.text = "未選擇"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ class DatingMicroViewAdapter(context: Context?) : BaseMicroViewAdapter(context)
|
||||
if (AvRoomDataManager.POSITION_VIP_MIC == position) {
|
||||
tvNick.text = ""
|
||||
} else if (position != -1) {
|
||||
tvNick.text = "号${if (manMicro) "男神" else "女神"}位"
|
||||
tvNick.text = "號${if (manMicro) "男神" else "女神"}位"
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -129,7 +129,7 @@ class RoomPKCreateActivity : BaseViewBindingActivity<ActivityRoomPkCreateBinding
|
||||
binding.llPkRoom.isVisible = true
|
||||
ImageLoadUtils.loadImage(this, it.avatar, binding.ivAvatar)
|
||||
binding.tvRoomTitle.text = it.title.subAndReplaceDot(7)
|
||||
binding.tvRoomId.text = "Peko号:${it.erbanNo}"
|
||||
binding.tvRoomId.text = "Peko號:${it.erbanNo}"
|
||||
checkCommitEnable()
|
||||
}
|
||||
}
|
||||
|
@@ -11,9 +11,9 @@ class RoomPKSearchAdapter :
|
||||
BaseQuickAdapter<SimpleRoomInfo, BaseViewHolder>(R.layout.item_room_pk_search) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SimpleRoomInfo) {
|
||||
helper.setText(R.id.tv_room_title,item.title.subAndReplaceDot(7))
|
||||
.setText(R.id.tv_room_id,"Peko号:${item.erbanNo}")
|
||||
.setChecked(R.id.check_box,item.checked)
|
||||
helper.setText(R.id.tv_room_title,item.title.subAndReplaceDot(7))
|
||||
.setText(R.id.tv_room_id,"Peko号:${item.erbanNo}")
|
||||
.setChecked(R.id.check_box,item.checked)
|
||||
ImageLoadUtils.loadImage(mContext,item.avatar,helper.getView(R.id.iv_avatar))
|
||||
helper.addOnClickListener(R.id.iv_avatar,R.id.check_box)
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ class RoomPkReceivedDialog : BaseDialog<DialogRoomPkReceivedBinding>() {
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.tvNick.text = pkBean.inviteRoomTitle.subAndReplaceDot(7)
|
||||
binding.tvTime.text = "${pkBean.pkDuration}分钟"
|
||||
binding.tvTime.text = "${pkBean.pkDuration}分鐘"
|
||||
pkBean.pkDesc.ifNotNullOrEmpty {
|
||||
binding.tvDescTitle.isVisible = true
|
||||
binding.tvDesc.isVisible = true
|
||||
@@ -66,7 +66,7 @@ class RoomPkReceivedDialog : BaseDialog<DialogRoomPkReceivedBinding>() {
|
||||
RoomPKModel.acceptRoomPK(accept, AvRoomDataManager.get().roomUid, pkBean.roundId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
//"接受PK邀请成功".toast()
|
||||
//"接受PK邀請成功".toast()
|
||||
dismissAllowingStateLoss()
|
||||
}, {
|
||||
it.message.toast()
|
||||
|
@@ -121,8 +121,8 @@ import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
|
||||
/**
|
||||
* 房间基类,这里实现了一些房间基础功能
|
||||
* 如发消息、公屏、底部按钮等等...
|
||||
* 房間基類,這裏實現了一些房間基礎功能
|
||||
* 如發消息、公屏、底部按鈕等等...
|
||||
*
|
||||
* @author chenran
|
||||
* @date 2017/7/26
|
||||
@@ -148,24 +148,24 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
protected var isDatingMode = false
|
||||
|
||||
/**
|
||||
* 快捷发言
|
||||
* 快捷發言
|
||||
*/
|
||||
private var lastSendTime: Long = 0
|
||||
|
||||
|
||||
/**
|
||||
* 是否开启礼物值显示
|
||||
* 是否開啟禮物值顯示
|
||||
*/
|
||||
private var showGiftValue = false
|
||||
private var redPackageSendDialog: RedPackageSendDialog? = null
|
||||
private val mOnSoftKeyBoardChangeListener: OnSoftKeyBoardChangeListener =
|
||||
object : OnSoftKeyBoardChangeListener {
|
||||
override fun keyBoardShow(height: Int) {
|
||||
/*软键盘显示:执行隐藏title动画,并修改listview高度和装载礼物容器的高度*/
|
||||
/*軟鍵盤顯示:執行隱藏title動畫,並修改listview高度和裝載禮物容器的高度*/
|
||||
}
|
||||
|
||||
override fun keyBoardHide(height: Int) {
|
||||
/*软键盘隐藏:隐藏聊天输入框并显示聊天按钮,执行显示title动画,并修改listview高度和装载礼物容器的高度*/
|
||||
/*軟鍵盤隱藏:隱藏聊天輸入框並顯示聊天按鈕,執行顯示title動畫,並修改listview高度和裝載禮物容器的高度*/
|
||||
inputLayout.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -225,7 +225,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
@SuppressLint("CheckResult")
|
||||
@CallSuper
|
||||
override fun initiate() {
|
||||
//如果不需要开麦,并且还没有权限的情况下,重置状态为需要去打开麦克风
|
||||
//如果不需要開麥,並且還沒有權限的情況下,重置狀態為需要去打開麥克風
|
||||
myUid = AuthModel.get().currentUid
|
||||
isCloseScreen = AvRoomDataManager.get().isCloseScreen
|
||||
isOpenRedPackage = AvRoomDataManager.get().isOpenRedPackage
|
||||
@@ -245,7 +245,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
mvpPresenter?.chatRoomReConnect(IMNetEaseManager.get().mCacheRoomQueueInfo)
|
||||
}
|
||||
|
||||
// 接收公屏消息点击 可点击房间编辑页查看 事件
|
||||
// 接收公屏消息點擊 可點擊房間編輯頁查看 事件
|
||||
RxBus.get().toFlowable(OpenRoomIntroEvent::class.java)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe { showRoomIntroduction(false) }
|
||||
@@ -260,7 +260,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe { showUserCardDialog(it.uid) }
|
||||
|
||||
// 刷新礼物列表,获取房间专属礼物列表
|
||||
// 刷新禮物列表,獲取房間專屬禮物列表
|
||||
GiftModel.get().refreshGiftList(AvRoomDataManager.get().roomUid.toString()).subscribe()
|
||||
checkFollowOwner()
|
||||
mvpPresenter?.loadRoomRank()
|
||||
@@ -277,19 +277,19 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
val event = roomEvent.event
|
||||
when (event) {
|
||||
RoomEvent.ROOM_CHAT_RECONNECTION -> {
|
||||
// 重新调服务器的userroom/inV2,保持座位上有贵族
|
||||
// 重新調服務器的userroom/inV2,保持座位上有貴族
|
||||
mvpPresenter?.userRoomIn()
|
||||
//从新获取队列信息
|
||||
//從新獲取隊列信息
|
||||
mvpPresenter?.chatRoomReConnect(roomEvent.roomQueueInfo)
|
||||
//如果用户在麦上的话,会重新上麦一次,如果不在麦上,则自行更新
|
||||
//如果用戶在麥上的話,會重新上麥一次,如果不在麥上,則自行更新
|
||||
if (RxNetWorkUtils.isAvailable(mContext) && !AvRoomDataManager.get().isOwnerOnMic) {
|
||||
GiftValueMrg.get().handleReconnect(false)
|
||||
}
|
||||
}
|
||||
RoomEvent.ROOM_EXIT -> {
|
||||
// 退出房间,把标志置为 false
|
||||
// 退出房間,把標誌置為 false
|
||||
AvRoomDataManager.get().isFromMentoring = false
|
||||
// 退出房间的时候,要停止倒计时
|
||||
// 退出房間的時候,要停止倒計時
|
||||
EventBus.getDefault().post(MentoringStopCountingEvent())
|
||||
}
|
||||
RoomEvent.DOWN_CROWDED_MIC -> if (AvRoomDataManager.get().isOwner(roomEvent.account)) {
|
||||
@@ -349,7 +349,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
AvRoomDataManager.get().removeChatRoomMember(roomEvent.account.toString())
|
||||
}
|
||||
// 用户的贵族字段过期或者开通贵族,可以实时地监听ext字段变化,显示头饰,光晕等
|
||||
// 用戶的貴族字段過期或者開通貴族,可以實時地監聽ext字段變化,顯示頭飾,光暈等
|
||||
RoomEvent.ON_QUEUE_MEMBER_INFO_UPDATE -> microView.adapter.notifyDataSetChanged()
|
||||
RoomEvent.OTHER_KICK_OUT_ROOM,
|
||||
RoomEvent.OTHER_ADD_BLACK,
|
||||
@@ -365,7 +365,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启或关闭公屏
|
||||
* 開啟或關閉公屏
|
||||
*/
|
||||
private fun updateScreen() {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null ||
|
||||
@@ -388,14 +388,14 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 嗨聊房切换重置公屏消息(绿色公告)
|
||||
* 嗨聊房切換重置公屏消息(綠色公告)
|
||||
*/
|
||||
private fun addMessage(msg: ChatRoomMessage?) {
|
||||
AvRoomDataManager.get().addChatRoomMessage(msg)
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启或关闭礼物值
|
||||
* 開啟或關閉禮物值
|
||||
*/
|
||||
private fun openOrCloseGiftValue(isEnterRoom: Boolean) {
|
||||
if (AvRoomDataManager.get().isOpenKTV || AvRoomDataManager.get().isCpRoom) {
|
||||
@@ -412,7 +412,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
// 释放公屏和麦上的所有信息信息和动画
|
||||
// 釋放公屏和麥上的所有信息信息和動畫
|
||||
val roomUid = intent.getLongExtra(Constants.ROOM_UID, 0)
|
||||
if (roomUid != 0L && roomUid != AvRoomDataManager.get().mCurrentRoomInfo?.uid) {
|
||||
releaseView()
|
||||
@@ -426,7 +426,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
) {
|
||||
if (!ListUtils.isListEmpty(dialogInfo)) {
|
||||
rollPagerView.visibility = View.VISIBLE
|
||||
// 只有一个图标,隐藏底部指示器
|
||||
// 只有一個圖標,隱藏底部指示器
|
||||
val show = dialogInfo.size > 1
|
||||
rollPagerView.setHintView(object : ColorPointHintView(
|
||||
mContext, Color.WHITE, mContext.resources.getColor(
|
||||
@@ -464,7 +464,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
val bannerAdapter = RoomActAdapter(mContext, dialogInfo)
|
||||
rollPagerView.adapter = bannerAdapter
|
||||
rollPagerView.setPlayDelay(3000)
|
||||
//设置透明度
|
||||
//設置透明度
|
||||
rollPagerView.setAnimationDurtion(500)
|
||||
bannerAdapter.notifyDataSetChanged()
|
||||
bannerAdapter.setRoomActClickListener(RoomActClickListener { url ->
|
||||
@@ -473,7 +473,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
DialogWebViewActivity.start(mContext, url)
|
||||
})
|
||||
|
||||
// 模拟指示器在viewpager底部效果
|
||||
// 模擬指示器在viewpager底部效果
|
||||
val viewPager = rollPagerView.viewPager
|
||||
viewPager.offscreenPageLimit = dialogInfo.size
|
||||
val layoutParams = viewPager.layoutParams as RelativeLayout.LayoutParams
|
||||
@@ -491,12 +491,12 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
@CallSuper
|
||||
open fun updateView() {
|
||||
// 更新底栏
|
||||
// 更新底欄
|
||||
showBottomViewForDifRole()
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色显示不同的状态
|
||||
* 根據角色顯示不同的狀態
|
||||
*/
|
||||
@CallSuper
|
||||
open fun showBottomViewForDifRole() {
|
||||
@@ -507,7 +507,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
bottomView.showHomePartyDownMicBottom()
|
||||
}
|
||||
bottomView.showInputOrIcon(isOnMic)
|
||||
// 更新听筒消息
|
||||
// 更新聽筒消息
|
||||
bottomView.setRemoteMuteOpen(!AudioEngineManager.get().isRemoteMute)
|
||||
if (isOnMic) {
|
||||
if (musicPlayerView == null) {
|
||||
@@ -520,11 +520,11 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否关注房主,然后弹出
|
||||
* 檢查是否關註房主,然後彈出
|
||||
*/
|
||||
private fun checkFollowOwner() {
|
||||
val currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo ?: return
|
||||
//如果当前账号是房主也过滤
|
||||
//如果當前賬號是房主也過濾
|
||||
if (AvRoomDataManager.get().isRoomOwner) {
|
||||
return
|
||||
}
|
||||
@@ -545,7 +545,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
&& myUid.toString() == roomQueueInfo.mChatRoomMember.account
|
||||
&& roomQueueInfo.mRoomMicInfo?.isMicMute == true
|
||||
) {
|
||||
//先判断坑位是否被闭麦了
|
||||
//先判斷坑位是否被閉麥了
|
||||
bottomView.setMicBtnEnable(false)
|
||||
bottomView.setMicBtnOpen(false)
|
||||
} else {
|
||||
@@ -553,7 +553,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (AudioEngineManager.get().isMute) {
|
||||
bottomView.setMicBtnOpen(false)
|
||||
} else {
|
||||
//获取当前是否有麦克风权限
|
||||
//獲取當前是否有麥克風權限
|
||||
val isPermission = isHavingMicPermissions
|
||||
if (!isPermission) {
|
||||
AudioEngineManager.get().isMute = true
|
||||
@@ -592,7 +592,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (chatRoomStatusChangeData != null &&
|
||||
chatRoomStatusChangeData.status == StatusCode.LOGINED
|
||||
) {
|
||||
// 重新调服务器的userroom/inV2,保持座位上有贵族
|
||||
// 重新調服務器的userroom/inV2,保持座位上有貴族
|
||||
mvpPresenter?.userRoomIn()
|
||||
}
|
||||
}
|
||||
@@ -663,12 +663,12 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
return
|
||||
}
|
||||
mvpPresenter?.sendTextMsg(msg, atProxy)
|
||||
messageView.setNeedAutoScroll(true) // 发送后自动滚动公屏列表
|
||||
messageView.setNeedAutoScroll(true) // 發送後自動滾動公屏列表
|
||||
inputEdit.setText("")
|
||||
}
|
||||
|
||||
/**
|
||||
* 软键盘显示与隐藏的监听
|
||||
* 軟鍵盤顯示與隱藏的監聽
|
||||
*/
|
||||
private fun softKeyboardListener() {
|
||||
SoftKeyBoardListener.setListener(activity, mOnSoftKeyBoardChangeListener)
|
||||
@@ -702,7 +702,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
||||
.doOnError {
|
||||
if (it is VipLevelNotEnoughException) {
|
||||
dialogManager.showOkDialog("尚未达到赠送${giftInfo.giftName}所需贵族等级,所需贵族等级:${giftInfo.giftVipInfo?.vipName}")
|
||||
dialogManager.showOkDialog("尚未達到贈送${giftInfo.giftName}所需貴族等級,所需貴族等級:${giftInfo.giftVipInfo?.vipName}")
|
||||
}
|
||||
}
|
||||
.subscribe { _, throwable ->
|
||||
@@ -715,7 +715,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.roomcp_gift_open_click, "礼物面板按钮")
|
||||
.onEvent(StatisticsProtocol.roomcp_gift_open_click, "禮物面板按鈕")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,7 +738,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
showBottomViewForDifRole()
|
||||
updateMicBtn()
|
||||
microView.adapter.notifyDataSetChanged()
|
||||
//下麦时更新最高最低头饰
|
||||
//下麥時更新最高最低頭飾
|
||||
GiftValueMrg.get().updateRoomGiftValue(false)
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
) {
|
||||
val buttonItems: MutableList<ButtonItem> = ArrayList(4)
|
||||
val presideMic = AvRoomDataManager.get().isDatingMode && micPosition == -1
|
||||
val presideText = if (presideMic) "当主持人" else ""
|
||||
val presideText = if (presideMic) "當主持人" else ""
|
||||
val buttonItem1 = ButtonItem(
|
||||
getString(R.string.embrace_up_mic) + presideText,
|
||||
object : ButtonItem.OnClickListener {
|
||||
@@ -805,15 +805,15 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
})
|
||||
val buttonItem4 =
|
||||
ButtonItem("上麦") { toUpMicroPhone(micPosition, currentUid.toString() + "", false) }
|
||||
//别问为什么,ui调整了顺序
|
||||
//禁用超管的上麦和抱TA上麦
|
||||
ButtonItem("上麥") { toUpMicroPhone(micPosition, currentUid.toString() + "", false) }
|
||||
//別問為什麽,ui調整了順序
|
||||
//禁用超管的上麥和抱TA上麥
|
||||
if (!SuperAdminUtil.isSuperAdmin()) {
|
||||
//个播房没有主动上麦功能
|
||||
//個播房沒有主動上麥功能
|
||||
if (!AvRoomDataManager.get().isSingleRoom) {
|
||||
buttonItems.add(buttonItem4)
|
||||
}
|
||||
//个播房只有房主有抱上麦功能
|
||||
//個播房只有房主有抱上麥功能
|
||||
if ((!AvRoomDataManager.get().isSingleRoom || AvRoomDataManager.get().isRoomOwner) &&
|
||||
!AvRoomDataManager.get().isDatingVipMic(micPosition)
|
||||
) {
|
||||
@@ -821,7 +821,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
}
|
||||
if (!AvRoomDataManager.get().isOpenPKMode) {
|
||||
//超管只有锁麦操作
|
||||
//超管只有鎖麥操作
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
if (!roomMicInfo.isMicLock && !isQueue) {
|
||||
buttonItems.add(buttonItem3)
|
||||
@@ -832,7 +832,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
}
|
||||
}
|
||||
//超管只有闭麦操作
|
||||
//超管只有閉麥操作
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
if (!roomMicInfo.isMicMute) {
|
||||
buttonItems.add(buttonItem2)
|
||||
@@ -906,9 +906,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (isModify) {
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_SET_TOPIC_CLICK, "设置房间话题")
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_SET_TOPIC_CLICK, "設置房間話題")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_SET_TOPIC_CLICK, "设置房间话题")
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_SET_TOPIC_CLICK, "設置房間話題")
|
||||
RoomTitleEditActivity.startForResult(activity, info.roomDesc, info.introduction)
|
||||
} else {
|
||||
val dialogFragment =
|
||||
@@ -933,7 +933,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
val micPosition = data.extras?.getInt(Constants.KEY_POSITION, Int.MIN_VALUE)
|
||||
if (micPosition == Int.MIN_VALUE) return
|
||||
|
||||
//抱人上麦
|
||||
//抱人上麥
|
||||
mvpPresenter?.inviteMicroPhone(
|
||||
BaseInfo(account, nick),
|
||||
micPosition ?: Int.MIN_VALUE
|
||||
@@ -963,7 +963,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
}
|
||||
if (AvRoomDataManager.get().isRoomOwner(account)) {
|
||||
//当前是房主
|
||||
//當前是房主
|
||||
AvRoomDataManager.get().mRoomCreateMember = null
|
||||
}
|
||||
}
|
||||
@@ -978,7 +978,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示资料卡片
|
||||
* 顯示資料卡片
|
||||
*/
|
||||
private fun showUserCardDialog(account: String) {
|
||||
UserInfoDialog.showNewUserInfoDialog(
|
||||
@@ -994,7 +994,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
@SuppressLint("CheckResult")
|
||||
override fun toUpMicroPhone(micPosition: Int, currentUid: String, b: Boolean) {
|
||||
if (AvRoomDataManager.get().isSelfGamePlaying) {
|
||||
SingleToastUtil.showToast("游戏中不可以换麦!")
|
||||
SingleToastUtil.showToast("遊戲中不可以換麥!")
|
||||
return
|
||||
}
|
||||
UserModel.get().cacheLoginUserInfo?.gameStatus = GameStatus.STATUS_NOT_JOIN
|
||||
@@ -1003,13 +1003,13 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (result) {
|
||||
mvpPresenter?.upMicroPhone(micPosition, currentUid, b)
|
||||
} else {
|
||||
toast("请给予麦克风权限后再试!")
|
||||
toast("請給予麥克風權限後再試!")
|
||||
}
|
||||
}, { throwable: Throwable? -> toast("发生一些异常,请稍后重试!") })
|
||||
}, { throwable: Throwable? -> toast("發生一些異常,請稍後重試!") })
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有麦克风权限
|
||||
* 是否有麥克風權限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -1091,15 +1091,15 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
sendMsg(phrases[position])
|
||||
lastSendTime = CurrentTimeUtils.getCurrentTime()
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_ROOM_QUICKCHAT_CLICK, "语音房_快捷发言")
|
||||
.onEvent(StatisticsProtocol.EVENT_ROOM_QUICKCHAT_CLICK, "語音房_快捷發言")
|
||||
} else {
|
||||
val roomInfo =
|
||||
AvRoomDataManager.get().mCurrentRoomInfo ?: return@setOnItemClickListener
|
||||
if (roomInfo.isCloseScreen) {
|
||||
toast("房间公屏已关闭")
|
||||
toast("房間公屏已關閉")
|
||||
return@setOnItemClickListener
|
||||
}
|
||||
SingleToastUtil.showToast("你发送的太频繁啦,请稍后再试")
|
||||
SingleToastUtil.showToast("你發送的太頻繁啦,請稍後再試")
|
||||
}
|
||||
}
|
||||
speedyMessageContainer.findViewById<View>(R.id.iv_close_speedy_message).setOnClickListener {
|
||||
@@ -1110,12 +1110,12 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
override fun onFollowSuccess(position: Int) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_FOLLOW_OWNER_FROM_ROOM, "语音房-关注房主")
|
||||
.onEvent(StatisticsProtocol.EVENT_FOLLOW_OWNER_FROM_ROOM, "語音房-關註房主")
|
||||
messageView.changeFollowStatus(position, true)
|
||||
}
|
||||
|
||||
override fun onFollowFail(msg: String?) {
|
||||
toast("关注失败,请稍后重试")
|
||||
toast("關註失敗,請稍後重試")
|
||||
}
|
||||
|
||||
override fun updateMicView() {
|
||||
@@ -1136,7 +1136,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
private fun onSendGiftBtnClick(giftId: Int = 0) {
|
||||
if (giftDialog == null) {
|
||||
GiftDialog.GIFT_DIALOG_FROM = "房间"
|
||||
GiftDialog.GIFT_DIALOG_FROM = "房間"
|
||||
giftDialog = GiftDialog(context, giftId)
|
||||
giftDialog?.setGiftDialogBtnClickListener(this@BaseRoomFragment)
|
||||
giftDialog?.setOnDismissListener { giftDialog = null }
|
||||
@@ -1146,13 +1146,13 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_GIFT_CLICK, "礼物面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_GIFT_CLICK, "禮物面板按鈕")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_GIFT_CLICK, "礼物面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_GIFT_CLICK, "禮物面板按鈕")
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启相亲模式管理增加一条公屏提示
|
||||
* 開啟相親模式管理增加一條公屏提示
|
||||
*/
|
||||
private fun addOpenDatingTips() {
|
||||
if (AvRoomDataManager.get().isDatingMode && !isDatingMode && AvRoomDataManager.get().isManager) {
|
||||
@@ -1164,7 +1164,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户弹窗点击@Ta
|
||||
* 用戶彈窗點擊@Ta
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
@@ -1185,7 +1185,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
}
|
||||
|
||||
/**
|
||||
* 底部按钮点击处理
|
||||
* 底部按鈕點擊處理
|
||||
*/
|
||||
open inner class BaseRoomBottomViewWrapper : BottomViewListenerWrapper() {
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -1193,7 +1193,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
val roomQueueInfo = AvRoomDataManager.get()
|
||||
.getRoomQueueMemberInfoByAccount(AuthModel.get().currentUid.toString())
|
||||
if (roomQueueInfo?.mRoomMicInfo == null) return
|
||||
//先判断麦上是否是开麦的
|
||||
//先判斷麥上是否是開麥的
|
||||
if (!roomQueueInfo.mRoomMicInfo.isMicMute && !AudioEngineManager.get().isAudienceRole) {
|
||||
if (!isHavingMicPermissions) {
|
||||
val rxPermissions = RxPermissions(this@BaseRoomFragment)
|
||||
@@ -1204,7 +1204,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER)
|
||||
updateMicBtn()
|
||||
} else {
|
||||
toast("开启权限后才能开麦")
|
||||
toast("開啟權限後才能開麥")
|
||||
}
|
||||
}
|
||||
return
|
||||
@@ -1214,7 +1214,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (AudioEngineManager.get().isMute) {
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_MP_ROOM_CLOSE_MIC_CLICK,
|
||||
"关闭麦克风"
|
||||
"關閉麥克風"
|
||||
)
|
||||
} else if (AvRoomDataManager.get().isOnMic(myUid)) {
|
||||
AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER)
|
||||
@@ -1225,9 +1225,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
override fun onSendFaceBtnClick() {
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_EMOTICON_CLICK, "表情面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_EMOTICON_CLICK, "表情面板按鈕")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_EMOTICON_CLICK, "表情面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_EMOTICON_CLICK, "表情面板按鈕")
|
||||
if (AvRoomDataManager.get().isOnMic(myUid) || AvRoomDataManager.get().isRoomOwner) {
|
||||
if (dynamicFaceDialog == null) {
|
||||
dynamicFaceDialog = DynamicFaceDialog(context)
|
||||
@@ -1239,7 +1239,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
dynamicFaceDialog?.show()
|
||||
}
|
||||
} else {
|
||||
toast("上麦才能发表情哦!")
|
||||
toast("上麥才能發表情哦!")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1250,7 +1250,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
KeyBoardUtils.showKeyBoard(context, inputEdit)
|
||||
StatisticManager.Instance().onEvent(
|
||||
BasicConfig.INSTANCE.appContext,
|
||||
StatisticsProtocol.EVENT_ROOM_INPUT_BOX_CLICK, "底部文字输入框点击", null
|
||||
StatisticsProtocol.EVENT_ROOM_INPUT_BOX_CLICK, "底部文字輸入框點擊", null
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1263,9 +1263,9 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
if (isRemoteMute) {
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_CLOSE_SOUND_CLICK, "关闭声音")
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_CLOSE_SOUND_CLICK, "關閉聲音")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_CLOSE_SOUND_CLICK, "关闭声音")
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_CLOSE_SOUND_CLICK, "關閉聲音")
|
||||
}
|
||||
AudioEngineManager.get().isRemoteMute = isRemoteMute
|
||||
updateRemoteMuteBtn()
|
||||
@@ -1274,16 +1274,16 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
override fun onMoreBtnClick() {
|
||||
if (AvRoomDataManager.get().isCpRoom) {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_MORE_CLICK, "更多面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_CP_ROOM_MORE_CLICK, "更多面板按鈕")
|
||||
} else StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_MORE_CLICK, "更多面板按钮")
|
||||
.onEvent(StatisticsProtocol.EVENT_MP_ROOM_MORE_CLICK, "更多面板按鈕")
|
||||
val dialog = RoomOperationDialog(mContext)
|
||||
dialog.setOnActionListener {
|
||||
redPackageSendDialog = RedPackageSendDialog()
|
||||
redPackageSendDialog?.show(activity)
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_ROOM_SENDHONGBAO_CLICK,
|
||||
"进入发红包页面"
|
||||
"進入發紅包頁面"
|
||||
)
|
||||
}
|
||||
dialog.show()
|
||||
@@ -1291,7 +1291,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
|
||||
override fun onRoomMessageClick() {
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_CLICK, "语音房_消息")
|
||||
.onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_CLICK, "語音房_消息")
|
||||
RoomMsgActivity.start(mContext)
|
||||
}
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
/**
|
||||
* 个播房间
|
||||
* 個播房間
|
||||
*
|
||||
* @author chenran
|
||||
* @date 2017/7/26
|
||||
@@ -135,7 +135,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
|
||||
if (initInfo.hasFansTeamCurrentRoom) {
|
||||
if (AvRoomDataManager.get().isRoomOwner) {
|
||||
gameBinding.tvFansTeamOpt.text = "粉丝团(${initInfo.anchorFansNum})"
|
||||
gameBinding.tvFansTeamOpt.text = "粉絲團(${initInfo.anchorFansNum})"
|
||||
clickListener = View.OnClickListener {
|
||||
DialogWebViewActivity.start(
|
||||
requireContext(),
|
||||
@@ -145,7 +145,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
} else {
|
||||
if (initInfo.isAnchorFans) {
|
||||
gameBinding.tvFansTeamOpt.text =
|
||||
"粉丝LV.${if (initInfo.fansLevelSeq == 0) 1 else initInfo.fansLevelSeq}"
|
||||
"粉絲LV.${if (initInfo.fansLevelSeq == 0) 1 else initInfo.fansLevelSeq}"
|
||||
clickListener = View.OnClickListener {
|
||||
FansTeamJoinedActivity.start(requireContext())
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
}
|
||||
} else {
|
||||
if (AvRoomDataManager.get().isRoomOwner) {
|
||||
gameBinding.tvFansTeamOpt.text = "开通粉丝团"
|
||||
gameBinding.tvFansTeamOpt.text = "開通粉絲團"
|
||||
clickListener = View.OnClickListener {
|
||||
CommonWebViewActivity.start(
|
||||
requireContext(),
|
||||
@@ -165,7 +165,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
)
|
||||
}
|
||||
} else {
|
||||
gameBinding.tvFansTeamOpt.text = "该主播暂未开通粉丝团"
|
||||
gameBinding.tvFansTeamOpt.text = "該主播暫未開通粉絲團"
|
||||
}
|
||||
}
|
||||
gameBinding.flFansTeam.setOnClickListener(clickListener)
|
||||
@@ -219,7 +219,7 @@ class SingleRoomFragment : BaseRoomFragment<ISingleRoomView?, SingleRoomPresente
|
||||
}
|
||||
}
|
||||
|
||||
//显示请求上麦弹窗
|
||||
//顯示請求上麥彈窗
|
||||
private fun showInviteDialog(userInfo: UserInfo) {
|
||||
if (!this::upMicDialog.isInitialized) {
|
||||
upMicDialog = RequestUpMicDialog(requireContext())
|
||||
|
@@ -35,17 +35,17 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
private var APP_CODE = ""
|
||||
|
||||
private val mRoomID = AvRoomDataManager.get().roomUid.toString()
|
||||
private val mLanguage = "zh-CN" //语言
|
||||
private val mLanguage = "zh-TW" //語言
|
||||
|
||||
//调用游戏SDK的接口,成功加载游戏后可用:
|
||||
//調用遊戲SDK的接口,成功加載遊戲後可用:
|
||||
private var iSudFSTAPP: ISudFSTAPP? = null
|
||||
|
||||
private val gson = Gson()
|
||||
|
||||
//小游戏ID
|
||||
//小遊戲ID
|
||||
private var mMGID = 0L
|
||||
|
||||
//通用状态-游戏,关键词
|
||||
//通用狀態-遊戲,關鍵詞
|
||||
private var mKeyWord: String? = null
|
||||
private val mUid = AuthModel.get().currentUid.toString()
|
||||
|
||||
@@ -66,7 +66,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
override fun onLoginSuccess(new_code: String, expire_Date: Long) {
|
||||
APP_CODE = new_code
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
//初始化游戏SDK
|
||||
//初始化遊戲SDK
|
||||
initGameSDK(
|
||||
activity,
|
||||
AppConfig.APP_ID,
|
||||
@@ -97,7 +97,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 例如"你画我猜"游戏的文字命中
|
||||
* 例如"你畫我猜"遊戲的文字命中
|
||||
*/
|
||||
fun hitTheMark(msg: String) {
|
||||
mKeyWord?.let {
|
||||
@@ -108,8 +108,8 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* "接入方客户端"登陆接口, 从"接入方服务端"获得Code
|
||||
* "接入方服务端"是通过"服务端接入SDK"获得Code来返回给"接入方客户端"的
|
||||
* "接入方客戶端"登陸接口, 從"接入方服務端"獲得Code
|
||||
* "接入方服務端"是通過"服務端接入SDK"獲得Code來返回給"接入方客戶端"的
|
||||
* @param listener
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -125,12 +125,12 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 1,初始化游戏SDK
|
||||
* 1,初始化遊戲SDK
|
||||
*
|
||||
* @param context 上下文
|
||||
* @param appID appID
|
||||
* @param appKey appKey
|
||||
* @param isTestEnv 是否是测试环境,true:测试环境,false:正式环境
|
||||
* @param isTestEnv 是否是測試環境,true:測試環境,false:正式環境
|
||||
*/
|
||||
private fun initGameSDK(context: Context, appID: String, appKey: String, isTestEnv: Boolean) {
|
||||
SudMGP.initSDK(context, appID, appKey, isTestEnv, object : ISudListenerInitSDK {
|
||||
@@ -139,21 +139,21 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
override fun onFailure(code: Int, errInfo: String) {
|
||||
showToast("初始化游戏SDK失败:$code--errInfo:$errInfo")
|
||||
showToast("初始化遊戲SDK失敗:$code--errInfo:$errInfo")
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 2,加载游戏
|
||||
* 2,加載遊戲
|
||||
*
|
||||
* @param activity 上下文Activity
|
||||
* @param userID 用户ID,业务系统保证每个用户拥有唯一ID
|
||||
* @param roomID 房间ID,进入同一房间内的
|
||||
* @param userID 用戶ID,業務系統保證每個用戶擁有唯一ID
|
||||
* @param roomID 房間ID,進入同一房間內的
|
||||
* @param code 令牌
|
||||
* @param mgID 小游戏ID
|
||||
* @param language 游戏语言 现支持,简体:zh-CN 繁体:zh-TW 英语:en-US 马来语:ms-MY
|
||||
* @param mgID 小遊戲ID
|
||||
* @param language 遊戲語言 現支持,簡體:zh-CN 繁體:zh-TW 英語:en-US 馬來語:ms-MY
|
||||
*/
|
||||
private fun loadMG(
|
||||
activity: Activity,
|
||||
@@ -169,7 +169,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 3,将游戏view添加到我们的布局当中
|
||||
* 3,將遊戲view添加到我們的布局當中
|
||||
*
|
||||
* @param gameView
|
||||
*/
|
||||
@@ -184,7 +184,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
|
||||
/**
|
||||
* 通知"文字命中状态"到游戏端
|
||||
* 通知"文字命中狀態"到遊戲端
|
||||
*
|
||||
* @param iSudFSTAPP
|
||||
* @param keyWord
|
||||
@@ -192,16 +192,16 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
private fun notifySelfTextHit(keyWord: String?, msg: String) {
|
||||
LogUtils.d("notifySelfTextHit")
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state: String = SudMGPAPPState.APP_COMMON_SELF_TEXT_HIT
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("isHit", true) // true 命中,false 未命中
|
||||
jsonObject.put("keyWord", keyWord) // true 命中,false 未命中
|
||||
jsonObject.put("text", msg) // 聊天原始内容,这里的值只是一个示例,意指内容当中包含关键词则命中,具体按业务规则定。
|
||||
jsonObject.put("text", msg) // 聊天原始內容,這裏的值只是一個示例,意指內容當中包含關鍵詞則命中,具體按業務規則定。
|
||||
val dataJson = jsonObject.toString()
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -209,7 +209,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置当前关键词
|
||||
* 設置當前關鍵詞
|
||||
*
|
||||
* @param keyWord
|
||||
*/
|
||||
@@ -218,7 +218,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戏SDK调用app的接口
|
||||
* 遊戲SDK調用app的接口
|
||||
*/
|
||||
private val mISudFSMMG: ISudFSMMG = object : ISudFSMMG {
|
||||
|
||||
@@ -233,7 +233,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 回调此方法,表示令牌过期,此时需要刷新令牌并使用ISudFSMStateHandle回调
|
||||
* 回調此方法,表示令牌過期,此時需要刷新令牌並使用ISudFSMStateHandle回調
|
||||
* @param handle
|
||||
* @param dataJson
|
||||
*/
|
||||
@@ -260,12 +260,12 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理获取游戏视图信息
|
||||
* 處理獲取遊戲視圖信息
|
||||
* @param handle
|
||||
* @param dataJson
|
||||
*/
|
||||
override fun onGetGameViewInfo(handle: ISudFSMStateHandle, dataJson: String) {
|
||||
//拿到游戏View的宽高
|
||||
//拿到遊戲View的寬高
|
||||
val gameViewWidth = container.measuredWidth
|
||||
val gameViewHeight = container.measuredHeight
|
||||
if (gameViewWidth > 0 && gameViewHeight > 0) {
|
||||
@@ -273,7 +273,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
return
|
||||
}
|
||||
|
||||
//如果游戏View未加载完成,则监听加载完成时回调
|
||||
//如果遊戲View未加載完成,則監聽加載完成時回調
|
||||
container.viewTreeObserver.addOnGlobalLayoutListener(object : OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
container.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
@@ -289,7 +289,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知游戏,游戏视图信息
|
||||
* 通知遊戲,遊戲視圖信息
|
||||
* @param handle
|
||||
* @param gameViewWidth
|
||||
* @param gameViewHeight
|
||||
@@ -304,13 +304,13 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
jsonObject.put("ret_code", 0)
|
||||
jsonObject.put("ret_msg", "success")
|
||||
|
||||
//游戏View大小
|
||||
//遊戲View大小
|
||||
val viewSize = JSONObject()
|
||||
viewSize.put("width", gameViewWidth)
|
||||
viewSize.put("height", gameViewHeight)
|
||||
jsonObject.put("view_size", viewSize)
|
||||
|
||||
//游戏安全操作区域
|
||||
//遊戲安全操作區域
|
||||
val viewGameRect = JSONObject()
|
||||
viewGameRect.put("left", 0)
|
||||
viewGameRect.put("top", ScreenUtil.dip2px(200f))
|
||||
@@ -318,7 +318,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
viewGameRect.put("bottom", ScreenUtil.dip2px(200f))
|
||||
jsonObject.put("view_game_rect", viewGameRect)
|
||||
|
||||
//通知游戏
|
||||
//通知遊戲
|
||||
val json = jsonObject.toString()
|
||||
Log.d(TAG, "notifyGameViewInfo:$json")
|
||||
handle.success(json)
|
||||
@@ -328,10 +328,10 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 游戏状态变化
|
||||
* 遊戲狀態變化
|
||||
* @param handle
|
||||
* @param state 状态名
|
||||
* @param dataJson 状态数据,json字符串
|
||||
* @param state 狀態名
|
||||
* @param dataJson 狀態數據,json字符串
|
||||
*/
|
||||
override fun onGameStateChange(
|
||||
handle: ISudFSMStateHandle,
|
||||
@@ -340,7 +340,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
) {
|
||||
Log.d(TAG, "onGameStateChange state:$state--dataJson:$dataJson")
|
||||
when (state) {
|
||||
//SudMGPMGState.MG_COMMON_PUBLIC_MESSAGE -> showToast("游戏:公屏消息")
|
||||
//SudMGPMGState.MG_COMMON_PUBLIC_MESSAGE -> showToast("遊戲:公屏消息")
|
||||
SudMGPMGState.MG_COMMON_KEY_WORD_TO_HIT -> {
|
||||
if (TextUtils.isEmpty(dataJson)) {
|
||||
setKeyWord(null)
|
||||
@@ -377,11 +377,11 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
/**
|
||||
* 玩家状态变化
|
||||
* 玩家狀態變化
|
||||
* @param handle
|
||||
* @param userId 玩家用户ID
|
||||
* @param state 状态名
|
||||
* @param dataJson 状态数据,json字符串。参考文档
|
||||
* @param userId 玩家用戶ID
|
||||
* @param state 狀態名
|
||||
* @param dataJson 狀態數據,json字符串。參考文檔
|
||||
*/
|
||||
override fun onPlayerStateChange(
|
||||
handle: ISudFSMStateHandle,
|
||||
@@ -445,7 +445,7 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
} else if (isJoin) {
|
||||
val upPosition = AvRoomDataManager.get().findGamePosition()
|
||||
if (upPosition == Int.MIN_VALUE) {
|
||||
showToast("当前游戏人数已满!")
|
||||
showToast("當前遊戲人數已滿!")
|
||||
} else {
|
||||
UserModel.get().cacheLoginUserInfo?.gameStatus = 1
|
||||
homePartyModel.upMicroPhone(upPosition,
|
||||
@@ -532,18 +532,18 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
if (!isIn) {
|
||||
notifySelfReadyState(false)
|
||||
}
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_IN
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("isIn", isIn) // true 加入游戏,false 退出游戏
|
||||
jsonObject.put("isIn", isIn) // true 加入遊戲,false 退出遊戲
|
||||
if (seatIndex != -1) {
|
||||
jsonObject.put("seatIndex", seatIndex)
|
||||
}
|
||||
jsonObject.put("teamId", 1) //哪一队伍(2v2,4v4)
|
||||
jsonObject.put("teamId", 1) //哪一隊伍(2v2,4v4)
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -552,15 +552,15 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
private fun notifySelfReadyState(isReady: Boolean) {
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_READY
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("isReady", isReady) // true 准备,false 取消准备
|
||||
jsonObject.put("isReady", isReady) // true 準備,false 取消準備
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -569,15 +569,15 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
private fun notifySelfPlayingState(isPlaying: Boolean) {
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_PLAYING
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("isPlaying", isPlaying) // true 开始游戏,false 结束游戏
|
||||
jsonObject.put("isPlaying", isPlaying) // true 開始遊戲,false 結束遊戲
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -586,15 +586,15 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
private fun notifySelfCaptainState(uid: String) {
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_CAPTAIN
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("curCaptainUID", uid) // 必填,指定队长uid
|
||||
jsonObject.put("curCaptainUID", uid) // 必填,指定隊長uid
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -603,15 +603,15 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
private fun notifySelfKickState(uid: String) {
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_KICK
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
jsonObject.put("kickedUID", uid) // 被踢用户uid
|
||||
jsonObject.put("kickedUID", uid) // 被踢用戶uid
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -620,14 +620,14 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
private fun notifySelfEndState() {
|
||||
try {
|
||||
//状态名称
|
||||
//狀態名稱
|
||||
val state = SudMGPAPPState.APP_COMMON_SELF_END
|
||||
|
||||
//状态数据
|
||||
//狀態數據
|
||||
val jsonObject = JSONObject()
|
||||
val dataJson = jsonObject.toString()
|
||||
|
||||
//调用接口
|
||||
//調用接口
|
||||
iSudFSTAPP?.notifyStateChange(state, dataJson, null)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
@@ -635,19 +635,19 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
}
|
||||
|
||||
fun onStart() {
|
||||
iSudFSTAPP?.startMG() //启动游戏
|
||||
iSudFSTAPP?.startMG() //啟動遊戲
|
||||
}
|
||||
|
||||
fun onResume() {
|
||||
iSudFSTAPP?.playMG() //开始游戏
|
||||
iSudFSTAPP?.playMG() //開始遊戲
|
||||
}
|
||||
|
||||
fun onPause() {
|
||||
iSudFSTAPP?.pauseMG() //暂停游戏
|
||||
iSudFSTAPP?.pauseMG() //暫停遊戲
|
||||
}
|
||||
|
||||
fun onStop() {
|
||||
iSudFSTAPP?.stopMG() //停止游戏
|
||||
iSudFSTAPP?.stopMG() //停止遊戲
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
@@ -659,14 +659,14 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
||||
|
||||
internal interface AppLoginListener {
|
||||
/**
|
||||
* App Server 登陆失败, App Server 不能返回CODE
|
||||
* App Server 登陸失敗, App Server 不能返回CODE
|
||||
*/
|
||||
fun onLoginFailure(err: String?)
|
||||
|
||||
/**
|
||||
* App Server 登陆成功, App Server调用服务端接入SDK的API获取Code 返回给 App
|
||||
* App 就要用CODE和自己生成的UserID去调用SDK的初始化函数,登陆小游戏
|
||||
* 小游戏登陆成功后,其UserID,就是App传的UserID
|
||||
* App Server 登陸成功, App Server調用服務端接入SDK的API獲取Code 返回給 App
|
||||
* App 就要用CODE和自己生成的UserID去調用SDK的初始化函數,登陸小遊戲
|
||||
* 小遊戲登陸成功後,其UserID,就是App傳的UserID
|
||||
*/
|
||||
fun onLoginSuccess(new_code: String, expire_Date: Long)
|
||||
}
|
@@ -57,7 +57,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
//这里的height用MATCH_PARENT状态栏会被顶上去,不知道什么鬼
|
||||
//這裏的height用MATCH_PARENT狀態欄會被頂上去,不知道什麽鬼
|
||||
val height = ScreenUtil.screenHeight - ScreenUtil.getStatusBarHeight(context)
|
||||
window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, height)
|
||||
window.setGravity(Gravity.CENTER)
|
||||
@@ -77,7 +77,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
mapOf("charge_money" to "${it.chargeMoney}元")
|
||||
)
|
||||
} ?: run {
|
||||
"请选择充值产品!".toast()
|
||||
"請選擇充值產品!".toast()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
val closeClick = View.OnClickListener {
|
||||
finish()
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_NUGIFT_POP_CLOSE_CLICK, "新人专享礼物弹窗关闭点击")
|
||||
.onEvent(StatisticsProtocol.EVENT_NUGIFT_POP_CLOSE_CLICK, "新人專享禮物彈窗關閉點擊")
|
||||
}
|
||||
binding.root.setOnClickListener(closeClick)
|
||||
binding.ivClose.setOnClickListener(closeClick)
|
||||
@@ -156,7 +156,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity<DialogNewUserChargeGiftB
|
||||
finish()
|
||||
} else {
|
||||
binding.tvTime.text =
|
||||
"限时${TimeUtil.getElapseTimeForNewUserCharge(residueTime)}"
|
||||
"限時${TimeUtil.getElapseTimeForNewUserCharge(residueTime)}"
|
||||
}
|
||||
}, {
|
||||
it.printStackTrace()
|
||||
|
@@ -67,7 +67,7 @@ import io.reactivex.functions.Consumer;
|
||||
public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter<V> {
|
||||
|
||||
/**
|
||||
* 显示关注房主的时间
|
||||
* 顯示關註房主的時間
|
||||
*/
|
||||
public static final int SHOW_FOLLOW_TIME = 3 * 60 * 1000;
|
||||
public final Gson gson = new Gson();
|
||||
@@ -75,7 +75,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
public final AvRoomModel mAvRoomModel;
|
||||
public final SuperAdminModel mSuperAdminModel;
|
||||
/**
|
||||
* 判断所坑服务端是否响应回来了
|
||||
* 判斷所坑服務端是否響應回來了
|
||||
*/
|
||||
private boolean mIsLockMicPosResultSuccess = true;
|
||||
private boolean mIsUnLockMicPosResultSuccess = true;
|
||||
@@ -87,10 +87,10 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* 麦坑点击处理,麦上没人的时候
|
||||
* 麥坑點擊處理,麥上沒人的時候
|
||||
*
|
||||
* @param micPosition 麦序位置
|
||||
* @param chatRoomMember 坑上的用户
|
||||
* @param micPosition 麥序位置
|
||||
* @param chatRoomMember 坑上的用戶
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
public void microPhonePositionClick(final int micPosition, MicMemberInfo chatRoomMember) {
|
||||
@@ -150,7 +150,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
}
|
||||
|
||||
//发送云信消息,请求上麦
|
||||
//發送雲信消息,請求上麥
|
||||
private void requestUpMic(UserInfo userInfo) {
|
||||
RequestUpmicAttachment attachment = new RequestUpmicAttachment(0);
|
||||
attachment.setUserInfo(userInfo);
|
||||
@@ -182,11 +182,11 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
final String currentUid = String.valueOf(currentRoom.getUid());
|
||||
mHomePartyMode.lockMicroPhone(micPosition, currentUid, AuthModel.get().getTicket())
|
||||
.doOnSuccess(data -> {
|
||||
Logger.i("用户%1$s锁坑成功: %2$s", String.valueOf(currentUid), data);
|
||||
Logger.i("用戶%1$s鎖坑成功: %2$s", String.valueOf(currentUid), data);
|
||||
mIsLockMicPosResultSuccess = true;
|
||||
})
|
||||
.doOnError(throwable -> {
|
||||
Logger.i("用户%1$s锁坑失败: %2$s", String.valueOf(currentUid),
|
||||
Logger.i("用戶%1$s鎖坑失敗: %2$s", String.valueOf(currentUid),
|
||||
RxHelper.getNotEmptyError(throwable));
|
||||
mIsLockMicPosResultSuccess = true;
|
||||
})
|
||||
@@ -194,7 +194,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* 坑位释放锁
|
||||
* 坑位釋放鎖
|
||||
*/
|
||||
public void unLockMicroPhone(int micPosition) {
|
||||
if (!mIsUnLockMicPosResultSuccess) {
|
||||
@@ -211,13 +211,13 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
.subscribe(new Consumer<String>() {
|
||||
@Override
|
||||
public void accept(String data) throws Exception {
|
||||
Logger.i("用户%1$s解麦成功: %2$s", String.valueOf(currentUid), data);
|
||||
Logger.i("用戶%1$s解麥成功: %2$s", String.valueOf(currentUid), data);
|
||||
mIsUnLockMicPosResultSuccess = true;
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
Logger.i("用户%1$s解麦失败: %2$s", String.valueOf(currentUid), throwable.getMessage());
|
||||
Logger.i("用戶%1$s解麥失敗: %2$s", String.valueOf(currentUid), throwable.getMessage());
|
||||
mIsUnLockMicPosResultSuccess = true;
|
||||
}
|
||||
});
|
||||
@@ -225,10 +225,10 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* 下麦
|
||||
* 下麥
|
||||
*
|
||||
* @param micPosition
|
||||
* @param isKick 是否是主动的
|
||||
* @param isKick 是否是主動的
|
||||
*/
|
||||
public void downMicroPhone(int micPosition, final boolean isKick) {
|
||||
final RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
@@ -239,7 +239,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
mHomePartyMode.downMicroPhone(micPosition, new CallBack<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
Logger.i("用户%1$s下麦成功:%2$s", currentUid, data);
|
||||
Logger.i("用戶%1$s下麥成功:%2$s", currentUid, data);
|
||||
if (!isKick) {
|
||||
//被踢了
|
||||
if (getMvpView() != null) {
|
||||
@@ -250,18 +250,18 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
|
||||
@Override
|
||||
public void onFail(int code, String error) {
|
||||
Logger.i("用户%1$s下麦失败:%2$s----", currentUid, error);
|
||||
Logger.i("用戶%1$s下麥失敗:%2$s----", currentUid, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上麦
|
||||
* 上麥
|
||||
*
|
||||
* @param micPosition
|
||||
* @param uId
|
||||
* @param isInviteUpMic 是否是主动的,false:主动
|
||||
* @param isReconnect 是否需要清除礼物值,普通情况下上麦传false,断网重连传ture
|
||||
* @param isInviteUpMic 是否是主動的,false:主動
|
||||
* @param isReconnect 是否需要清除禮物值,普通情況下上麥傳false,斷網重連傳ture
|
||||
*/
|
||||
public void upMicroPhone(final int micPosition, final String uId, boolean isInviteUpMic, boolean isReconnect) {
|
||||
final RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
@@ -286,7 +286,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
isInviteUpMic, new CallBack<String>() {
|
||||
@Override
|
||||
public void onSuccess(String data) {
|
||||
Logger.i("用户%1$s上麦成功:%2$s", uId, data);
|
||||
Logger.i("用戶%1$s上麥成功:%2$s", uId, data);
|
||||
if (!isReconnect) {
|
||||
GiftValueMrg.get().requestUpMic(micPosition, uId);
|
||||
} else {
|
||||
@@ -301,15 +301,15 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
getMvpView().updateMicView();
|
||||
}
|
||||
}
|
||||
Logger.i("用户%1$s上麦失败:%2$s----", uId, error);
|
||||
Logger.i("用戶%1$s上麥失敗:%2$s----", uId, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请用户上麦
|
||||
* 邀請用戶上麥
|
||||
*
|
||||
* @param micInfo 要邀请的用户
|
||||
* @param micInfo 要邀請的用戶
|
||||
* @param position 坑位
|
||||
*/
|
||||
public void inviteMicroPhone(final BaseInfo micInfo, final int position) {
|
||||
@@ -317,7 +317,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
if (AvRoomDataManager.get().isOnMic(micUid)) {
|
||||
return;
|
||||
}
|
||||
//如果点击的就是自己,那这里就是自己上麦
|
||||
//如果點擊的就是自己,那這裏就是自己上麥
|
||||
if (AvRoomDataManager.get().isOwner(micUid)) {
|
||||
upMicroPhone(position, String.valueOf(micUid), true);
|
||||
return;
|
||||
@@ -329,16 +329,16 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
public void accept(ChatRoomMessage chatRoomMessage,
|
||||
Throwable throwable) throws Exception {
|
||||
if (throwable != null) {
|
||||
Logger.i("邀请用户%d上麦失败!!!" + micUid);
|
||||
Logger.i("邀請用戶%d上麥失敗!!!" + micUid);
|
||||
} else
|
||||
Logger.i("邀请用户%d上麦成功!!!" + micUid);
|
||||
Logger.i("邀請用戶%d上麥成功!!!" + micUid);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 开麦
|
||||
* 開麥
|
||||
*
|
||||
* @param micPosition
|
||||
*/
|
||||
@@ -353,16 +353,16 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
public void accept(String data, String error) {
|
||||
super.accept(data, error);
|
||||
if (error != null) {
|
||||
Logger.i("用户%1$s开麦失败: %2$s", String.valueOf(roomInfo.getUid()), error);
|
||||
Logger.i("用戶%1$s開麥失敗: %2$s", String.valueOf(roomInfo.getUid()), error);
|
||||
} else {
|
||||
Logger.i("用户%1$s开麦成功: %2$s", String.valueOf(roomInfo.getUid()), data);
|
||||
Logger.i("用戶%1$s開麥成功: %2$s", String.valueOf(roomInfo.getUid()), data);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 闭麦
|
||||
* 閉麥
|
||||
*
|
||||
* @param micPosition
|
||||
*/
|
||||
@@ -373,10 +373,10 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
mHomePartyMode.closeMicroPhone(micPosition, roomInfo.getUid())
|
||||
.doOnSuccess(data -> {
|
||||
Logger.i("用户%1$s闭麦成功: %2$s", String.valueOf(roomInfo.getUid()), data);
|
||||
Logger.i("用戶%1$s閉麥成功: %2$s", String.valueOf(roomInfo.getUid()), data);
|
||||
})
|
||||
.doOnError(throwable -> {
|
||||
Logger.i("用户%1$s闭麦失败: %2$s", String.valueOf(roomInfo.getUid()),
|
||||
Logger.i("用戶%1$s閉麥失敗: %2$s", String.valueOf(roomInfo.getUid()),
|
||||
RxHelper.getNotEmptyError(throwable));
|
||||
})
|
||||
.subscribe();
|
||||
@@ -410,31 +410,31 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//麦上都没有人
|
||||
//麥上都沒有人
|
||||
AvRoomDataManager.get().resetMicMembers();
|
||||
}
|
||||
if (getMvpView() != null)
|
||||
getMvpView().chatRoomReConnectView();
|
||||
//之前在麦上
|
||||
//之前在麥上
|
||||
if (queueInfo != null && queueInfo.mChatRoomMember != null && queueInfo.mRoomMicInfo != null) {
|
||||
RoomQueueInfo roomQueueInfo = AvRoomDataManager.get()
|
||||
.getRoomQueueMemberInfoByMicPosition(queueInfo.mRoomMicInfo.getPosition());
|
||||
//麦上没人
|
||||
//麥上沒人
|
||||
String account = queueInfo.mChatRoomMember.getAccount();
|
||||
if (roomQueueInfo != null && (roomQueueInfo.mChatRoomMember == null ||
|
||||
Objects.equals(account, roomQueueInfo.mChatRoomMember.getAccount()))) {
|
||||
roomQueueInfo.mChatRoomMember = null;
|
||||
//断网重连,不要清除麦上的礼物值
|
||||
//斷網重連,不要清除麥上的禮物值
|
||||
upMicroPhone(queueInfo.mRoomMicInfo.getPosition(), account, true, true);
|
||||
}
|
||||
}
|
||||
IMNetEaseManager.get().mCacheRoomQueueInfo = null;
|
||||
Logger.i("断网重连获取队列信息成功...." + entries);
|
||||
Logger.i("斷網重連獲取隊列信息成功...." + entries);
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
Logger.i("断网重连获取队列信息失败....");
|
||||
Logger.i("斷網重連獲取隊列信息失敗....");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -454,12 +454,12 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
ChatRoomMessage firstMsg = IMNetEaseManager.get().getFirstMessageContent();
|
||||
IMNetEaseManager.get().addCloseScreenMessages(firstMsg);
|
||||
if (AvRoomDataManager.get().closeScreenBySAdmin()) {
|
||||
contentText = "系统检测涉嫌违规,予以关闭公屏消息警告";
|
||||
contentText = "系統檢測涉嫌違規,予以關閉公屏消息警告";
|
||||
} else {
|
||||
contentText = "管理员已关闭聊天公屏";
|
||||
contentText = "管理員已關閉聊天公屏";
|
||||
}
|
||||
} else {
|
||||
contentText = "管理员已开启聊天公屏";
|
||||
contentText = "管理員已開啟聊天公屏";
|
||||
}
|
||||
RoomInfoAttachment attachment = new RoomInfoAttachment(CustomAttachment.CUSTOM_MSG_UPDATE_ROOM_INFO,
|
||||
CustomAttachment.CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_SCREEN);
|
||||
@@ -473,7 +473,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否关注了这个用户
|
||||
* 檢查是否關註了這個用戶
|
||||
*
|
||||
* @param uid
|
||||
*/
|
||||
@@ -485,7 +485,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
.toObservable()
|
||||
.takeWhile(aBoolean -> !aBoolean && getMvpView() != null)
|
||||
.doOnNext(aBoolean -> getMvpView().noFollow())
|
||||
//个人主播房新加的关注提醒弹窗,以后还会不会有呢???
|
||||
//個人主播房新加的關註提醒彈窗,以後還會不會有呢???
|
||||
.takeWhile(aBoolean -> !AvRoomDataManager.get().isSingleRoom())
|
||||
.delay(4, TimeUnit.MINUTES)
|
||||
.single(false)
|
||||
@@ -502,7 +502,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
|
||||
/**
|
||||
* 关注房主
|
||||
* 關註房主
|
||||
*
|
||||
* @param position
|
||||
* @param ownerUid
|
||||
@@ -539,7 +539,7 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
}
|
||||
|
||||
/***
|
||||
* 发送房间消息
|
||||
* 發送房間消息
|
||||
* @param message
|
||||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
@@ -555,12 +555,12 @@ public class BaseRoomPresenter<V extends IBaseRoomView> extends BaseMvpPresenter
|
||||
if (throwable instanceof AntiSpamHitException) {
|
||||
Log.e("sendTextMsg", throwable.getMessage());
|
||||
} else {
|
||||
Logger.i("发送房间信息失败:" + throwable.getMessage());
|
||||
Logger.i("發送房間信息失敗:" + throwable.getMessage());
|
||||
}
|
||||
} else {
|
||||
getMvpView().onSendMsgSuccess(message);
|
||||
IMNetEaseManager.get().addMessagesImmediately(chatRoomMessage);
|
||||
Logger.i("发送房间信息成功:" + chatRoomMessage.getUuid());
|
||||
Logger.i("發送房間信息成功:" + chatRoomMessage.getUuid());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -78,12 +78,12 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
@SuppressLint("CheckResult")
|
||||
private fun startRedPacketAnim(v: View) {
|
||||
RedPackageModel.openRedPackage(redPackageNotifyInfo.redEnvelopeId)
|
||||
.subscribe({
|
||||
redPackageInfo = it
|
||||
if (mObjectAnimator?.isRunning == false) {
|
||||
openRedPackage()
|
||||
}
|
||||
.subscribe({
|
||||
redPackageInfo = it
|
||||
if (mObjectAnimator?.isRunning == false) {
|
||||
openRedPackage()
|
||||
}
|
||||
}
|
||||
, {
|
||||
binding.ivOpen.isEnabled = true
|
||||
mObjectAnimator?.cancel()
|
||||
@@ -136,10 +136,10 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
adapter.setNewData(this)
|
||||
binding.tvTips.setTextColor(Color.WHITE)
|
||||
binding.tvTips.text = MessageView.SpannableBuilder(binding.tvTips)
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_03))
|
||||
.append(it.amount, ForegroundColorSpan(Color.parseColor("#FDCD00")))
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_04))
|
||||
.build()
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_03))
|
||||
.append(it.amount, ForegroundColorSpan(Color.parseColor("#FDCD00")))
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_04))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
binding.tvDiamondNum.text = it.amount.substringBefore(".")
|
||||
@@ -147,10 +147,10 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
if (!AvRoomDataManager.get().isRoomFans){
|
||||
AvRoomDataManager.get().roomUid?.let {
|
||||
CollectionRoomModel.get().followRoom("1", it)
|
||||
.subscribe { _: String? ->
|
||||
AvRoomDataManager.get().isRoomFans = true
|
||||
EventBus.getDefault().post(FollowRoomEvent())
|
||||
}
|
||||
.subscribe { _: String? ->
|
||||
AvRoomDataManager.get().isRoomFans = true
|
||||
EventBus.getDefault().post(FollowRoomEvent())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
binding.tvNoGet.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
binding.tvRedNum.text = "已领取${pickNum}/${totalNum}个"
|
||||
binding.tvRedNum.text = "已領取${pickNum}/${totalNum}個"
|
||||
if (type == ALL_GIFT || type == ALL_DIAMOND) {
|
||||
DemoCache.saveRedPackage(id)
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
val initInfo = InitialModel.get().cacheInitInfo ?: InitInfo()
|
||||
|
||||
/**
|
||||
* 厅内
|
||||
* 廳內
|
||||
*/
|
||||
fun changeToNotAll() {
|
||||
isAll = false
|
||||
@@ -77,7 +77,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
binding.tvRoomRed.alpha = 1f
|
||||
binding.indicatorAllRed.visibility = View.GONE
|
||||
binding.indicatorRoomRed.visibility = View.VISIBLE
|
||||
binding.tvGoldNumHint.text = "红包总金额不低于${initInfo.redEnvelopeConfig.roomRedEnvelopeMinAmount}钻石,且必须为10的倍数"
|
||||
binding.tvGoldNumHint.text = "紅包總金額不低於${initInfo.redEnvelopeConfig.roomRedEnvelopeMinAmount}鉆石,且必須為10的倍數"
|
||||
binding.editRedNum.hint = "${initInfo.redEnvelopeConfig.roomRedEnvelopeMinNum}-${initInfo.redEnvelopeConfig.roomRedEnvelopeMaxNum}"
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
binding.tvRoomRed.alpha = 0.5f
|
||||
binding.indicatorAllRed.visibility = View.VISIBLE
|
||||
binding.indicatorRoomRed.visibility = View.GONE
|
||||
binding.tvGoldNumHint.text = "红包总金额不低于${initInfo.redEnvelopeConfig.serverRedEnvelopeMinAmount}钻石,且必须为100的倍数"
|
||||
binding.tvGoldNumHint.text = "紅包總金額不低於${initInfo.redEnvelopeConfig.serverRedEnvelopeMinAmount}鉆石,且必須為100的倍數"
|
||||
binding.editRedNum.hint = "${initInfo.redEnvelopeConfig.serverRedEnvelopeMinNum}-${initInfo.redEnvelopeConfig.serverRedEnvelopeMaxNum}"
|
||||
}
|
||||
|
||||
@@ -105,15 +105,15 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
binding.tvChangeType.setOnClickListener {
|
||||
if (isGift) {
|
||||
isGift = false
|
||||
binding.tvRedTypeHint.text = "当前为手气红包,"
|
||||
binding.tvChangeType.text = "改为礼物红包"
|
||||
binding.tvRedTypeHint.text = "當前為手氣紅包,"
|
||||
binding.tvChangeType.text = "改為禮物紅包"
|
||||
} else {
|
||||
isGift = true
|
||||
binding.tvRedTypeHint.text = "当前为礼物红包,"
|
||||
binding.tvChangeType.text = "改为手气红包"
|
||||
binding.tvRedTypeHint.text = "當前為禮物紅包,"
|
||||
binding.tvChangeType.text = "改為手氣紅包"
|
||||
}
|
||||
}
|
||||
//默认就已经是手气红包,如果后台配置为了礼物红包就在这里改下
|
||||
//默認就已經是手氣紅包,如果後臺配置為了禮物紅包就在這裏改下
|
||||
if (initInfo.redEnvelopeType == 2 && !isGift) {
|
||||
binding.tvChangeType.callOnClick()
|
||||
}
|
||||
@@ -143,33 +143,33 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
|
||||
val redNum = binding.editRedNum.text.toString().toIntOrDef()
|
||||
if (redNum < minNum || redNum > maxNum) {
|
||||
SingleToastUtil.showToast("红包数量不能小于${minNum}或大于${maxNum}!")
|
||||
SingleToastUtil.showToast("紅包數量不能小於${minNum}或大於${maxNum}!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
val goldNum = binding.editGoldNum.text.toString().toIntOrDef()
|
||||
|
||||
if (isAll) {
|
||||
if (goldNum % 100 != 0) {
|
||||
SingleToastUtil.showToast("钻石数必须为100的倍数!")
|
||||
SingleToastUtil.showToast("鉆石數必須為100的倍數!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
} else {
|
||||
if (goldNum % 10 != 0) {
|
||||
SingleToastUtil.showToast("钻石数必须为10的倍数!")
|
||||
SingleToastUtil.showToast("鉆石數必須為10的倍數!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
if (goldNum < minGold || goldNum > maxGold) {
|
||||
SingleToastUtil.showToast("钻石数量不能小于${minGold}或大于${maxGold}!")
|
||||
SingleToastUtil.showToast("鉆石數量不能小於${minGold}或大於${maxGold}!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (isGift && goldNum.toFloat() / redNum < 1) {//单个礼物红包价值不低于1钻石
|
||||
SingleToastUtil.showToast("单个红包金额过低")
|
||||
if (isGift && goldNum.toFloat() / redNum < 1) {//單個禮物紅包價值不低於1鉆石
|
||||
SingleToastUtil.showToast("單個紅包金額過低")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (!isGift && goldNum.toFloat() / redNum * rate < 0.1) {//单个手气红包价值不低于0.1水晶
|
||||
SingleToastUtil.showToast("单个红包金额过低")
|
||||
if (!isGift && goldNum.toFloat() / redNum * rate < 0.1) {//單個手氣紅包價值不低於0.1水晶
|
||||
SingleToastUtil.showToast("單個紅包金額過低")
|
||||
return@setOnClickListener
|
||||
}
|
||||
GiveGoldPassWordFragment.newInstance(requireFragmentManager(), binding.editGoldNum.text.toString()).apply {
|
||||
@@ -191,7 +191,7 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
event.keyCode == KeyEvent.KEYCODE_ENTER
|
||||
}
|
||||
|
||||
// StatUtil.onEvent("room_sendhongbao", "进入发红包页面")
|
||||
// StatUtil.onEvent("room_sendhongbao", "進入發紅包頁面")
|
||||
}
|
||||
|
||||
private fun getRedType(): Int {
|
||||
@@ -214,30 +214,30 @@ class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPass
|
||||
if (password.length == 6) {
|
||||
dialogManager.showProgressDialog(context)
|
||||
RedPackageModel.sendRedPackage(binding.editGoldNum.text.toString(),
|
||||
binding.editRedText.text.toString().ifEmpty { "恭喜发财,大吉大利!" },
|
||||
binding.editRedNum.text.toString(),
|
||||
AvRoomDataManager.get().mCurrentRoomInfo?.uid.toString(), getRedType(), DESUtils.DESAndBase64(password))
|
||||
.doOnError {
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast(it.message)
|
||||
passWordFragment?.password?.clearPassword()
|
||||
}
|
||||
.subscribe { _ ->
|
||||
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast("发送成功")
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
dismissAllowingStateLoss()
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_ROOM_SENDHONGBAO_SUCCESS,
|
||||
"发红包成功")
|
||||
}
|
||||
binding.editRedText.text.toString().ifEmpty { "恭喜發財,大吉大利!" },
|
||||
binding.editRedNum.text.toString(),
|
||||
AvRoomDataManager.get().mCurrentRoomInfo?.uid.toString(), getRedType(), DESUtils.DESAndBase64(password))
|
||||
.doOnError {
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast(it.message)
|
||||
passWordFragment?.password?.clearPassword()
|
||||
}
|
||||
.subscribe { _ ->
|
||||
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast("發送成功")
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
dismissAllowingStateLoss()
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_ROOM_SENDHONGBAO_SUCCESS,
|
||||
"發紅包成功")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onWalletInfoUpdate(event: UpdateWalletInfoEvent?) {
|
||||
binding.tvBalanceNum.text = PayModel.get().currentWalletInfo?.diamondNum?.toString()
|
||||
?: "0"
|
||||
?: "0"
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
@@ -129,7 +129,7 @@ class SingleRoomPKCreateActivity : BaseViewBindingActivity<ActivitySingleRoomPkC
|
||||
binding.llPkRoom.isVisible = true
|
||||
ImageLoadUtils.loadImage(this, it.avatar, binding.ivAvatar)
|
||||
binding.tvRoomTitle.text = it.title.subAndReplaceDot(7)
|
||||
binding.tvRoomId.text = "Peko号:${it.erbanNo}"
|
||||
binding.tvRoomId.text = "Peko號:${it.erbanNo}"
|
||||
checkCommitEnable()
|
||||
}
|
||||
}
|
||||
|
@@ -15,19 +15,19 @@ class SingleRoomPKSearchAdapter :
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: SimpleRoomInfo) {
|
||||
helper.setText(R.id.tv_room_title, item.nick.subAndReplaceDot(7))
|
||||
.setText(R.id.tv_room_id, "Peko号:${item.erbanNo}")
|
||||
.setText(R.id.tv_room_id, "Peko號:${item.erbanNo}")
|
||||
ImageLoadUtils.loadImage(mContext, item.avatar, helper.getView(R.id.iv_avatar))
|
||||
helper.addOnClickListener(R.id.iv_avatar, R.id.tv_select)
|
||||
val tvSelect = helper.getView<TextView>(R.id.tv_select)
|
||||
tvSelect.isEnabled = !item.crossPking && item.valid
|
||||
if (!item.valid) {
|
||||
tvSelect.text = "离线"
|
||||
tvSelect.text = "離線"
|
||||
tvSelect.setTextColor("#80C6C6E9".toColorInt())
|
||||
} else if (item.crossPking) {
|
||||
tvSelect.text = "PK中"
|
||||
tvSelect.setTextColor("#80C6C6E9".toColorInt())
|
||||
} else {
|
||||
tvSelect.text = "选择"
|
||||
tvSelect.text = "選擇"
|
||||
tvSelect.setTextColor(Color.WHITE)
|
||||
}
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ class SingleRoomPkFinishDialog : BaseDialog<DialogSingleRoomPkFinishBinding>() {
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.doOnComplete { dismissAllowingStateLoss() }
|
||||
.subscribe {
|
||||
binding.tvClose.text = "关闭(${5 - it})"
|
||||
binding.tvClose.text = "關閉(${5 - it})"
|
||||
}
|
||||
|
||||
when (roomPkBean.winUid) {
|
||||
|
@@ -37,7 +37,7 @@ class SingleRoomPkReceivedDialog : BaseDialog<DialogSingleRoomPkReceivedBinding>
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding.tvNick.text = pkBean.inviteRoomTitle.subAndReplaceDot(7)
|
||||
binding.tvTime.text = "${pkBean.pkDuration}分钟"
|
||||
binding.tvTime.text = "${pkBean.pkDuration}分鐘"
|
||||
pkBean.pkDesc.ifNotNullOrEmpty {
|
||||
binding.tvDescTitle.isVisible = true
|
||||
binding.tvDesc.isVisible = true
|
||||
@@ -66,7 +66,7 @@ class SingleRoomPkReceivedDialog : BaseDialog<DialogSingleRoomPkReceivedBinding>
|
||||
SingleRoomPKModel.acceptRoomPK(accept, AvRoomDataManager.get().roomUid, pkBean.roundId)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe({
|
||||
//"接受PK邀请成功".toast()
|
||||
//"接受PK邀請成功".toast()
|
||||
dismissAllowingStateLoss()
|
||||
}, {
|
||||
it.message.toast()
|
||||
|
@@ -180,15 +180,15 @@ import io.reactivex.functions.Consumer;
|
||||
import io.reactivex.functions.Function;
|
||||
|
||||
/**
|
||||
* 直播间消息界面
|
||||
* 直播間消息界面
|
||||
*
|
||||
* @author xiaoyu
|
||||
*/
|
||||
public class MessageView extends FrameLayout {
|
||||
|
||||
private static final String TAG = "MessageView";
|
||||
private final static int MAX_MESSAGE_SIZE = 2000;//公屏最多展示条数
|
||||
private final static int BLOCK_MAX_MESSAGE_SIZE = MAX_MESSAGE_SIZE * 3 / 2;//在查看消息停住的时候 最多消息条数.
|
||||
private final static int MAX_MESSAGE_SIZE = 2000;//公屏最多展示條數
|
||||
private final static int BLOCK_MAX_MESSAGE_SIZE = MAX_MESSAGE_SIZE * 3 / 2;//在查看消息停住的時候 最多消息條數.
|
||||
private static final int LOAD_MESSAGE_COUNT = 10;
|
||||
private final int textColor = 0x80ffffff;
|
||||
private final List<ChatRoomMessage> atMessages = new ArrayList<>();
|
||||
@@ -213,7 +213,7 @@ public class MessageView extends FrameLayout {
|
||||
private int expLevelWidth;
|
||||
private int expLevelHeight;
|
||||
private int giftLength;
|
||||
private volatile boolean needAutoScroll = true;//是否自动滚动到底部
|
||||
private volatile boolean needAutoScroll = true;//是否自動滾動到底部
|
||||
private Consumer<String> clickConsumer;
|
||||
private OnClick onClick;
|
||||
|
||||
@@ -275,11 +275,11 @@ public class MessageView extends FrameLayout {
|
||||
sysIconHeight = Utils.dip2px(context, 14);
|
||||
smallFace = Utils.dip2px(context, 22);
|
||||
bigFace = Utils.dip2px(context, 30);
|
||||
//经验等级图片后台已经更换尺寸了,公屏同步下,尺寸是26:20
|
||||
//經驗等級圖片後臺已經更換尺寸了,公屏同步下,尺寸是26:20
|
||||
expLevelHeight = Utils.dip2px(context, 20);
|
||||
expLevelWidth = expLevelHeight * 26 / 20;//expLevelHeight * 114 / 45
|
||||
giftLength = Utils.dip2px(context, 35);
|
||||
// 内容区域
|
||||
// 內容區域
|
||||
layoutManger = new LinearLayoutManager(context, RecyclerView.VERTICAL, false);
|
||||
FrameLayout.LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
messageListView = new RecyclerViewNoViewpagerScroll(context);
|
||||
@@ -385,7 +385,7 @@ public class MessageView extends FrameLayout {
|
||||
// + " mMessageAdapter.getItemCount()-1:" + (recyclerView.getAdapter().getItemCount()-1)
|
||||
// + " dis:"+ (lastVisibleItemPosition-(recyclerView.getAdapter().getItemCount()-1)));
|
||||
if (lastVisibleItemPosition >= recyclerView.getAdapter().getItemCount() - 3) {
|
||||
//最后一个显示出来了
|
||||
//最後一個顯示出來了
|
||||
// Logger.e(TAG, ResUtil.getString(R.string.avroom_widget_messageview_01));
|
||||
needAutoScroll = true;
|
||||
tvBottomTip.setVisibility(GONE);
|
||||
@@ -410,7 +410,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加公屏消息请使用 {@link AvRoomDataManager#addChatRoomMessage(ChatRoomMessage)}
|
||||
* 添加公屏消息請使用 {@link AvRoomDataManager#addChatRoomMessage(ChatRoomMessage)}
|
||||
*/
|
||||
private void addMessages(ChatRoomMessage msg) {
|
||||
if (msg == null) return;
|
||||
@@ -453,7 +453,7 @@ public class MessageView extends FrameLayout {
|
||||
if (!ListUtils.isListEmpty(atUids) && !ListUtils.isListEmpty(atNames)) {
|
||||
for (int i = 0; i < atUids.size(); i++) {
|
||||
String uid = atUids.get(i);
|
||||
// 只有当被 @ 人的数组中包含自己的时候才会去变色
|
||||
// 只有當被 @ 人的數組中包含自己的時候才會去變色
|
||||
if (Objects.equals(uid, String.valueOf(AuthModel.get().getCurrentUid()))) {
|
||||
Map<String, Long> atMap = DemoCache.readAtMsgUuid();
|
||||
if (atMap == null || !atMap.containsKey(msg.getUuid())) {
|
||||
@@ -471,7 +471,7 @@ public class MessageView extends FrameLayout {
|
||||
private void showTipsOrScrollToBottom() {
|
||||
if (!needAutoScroll) {
|
||||
tvBottomTip.setVisibility(VISIBLE);
|
||||
//超过某值后自动滚动下去
|
||||
//超過某值後自動滾動下去
|
||||
if (mMessageAdapter.getItemCount() > BLOCK_MAX_MESSAGE_SIZE) {
|
||||
messageListView.smoothScrollToPosition(mMessageAdapter.getItemCount() - 1);
|
||||
}
|
||||
@@ -486,7 +486,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
|
||||
/**
|
||||
* 修改关注状态
|
||||
* 修改關註狀態
|
||||
*
|
||||
* @param position
|
||||
* @param b
|
||||
@@ -503,7 +503,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改加入话题的状态
|
||||
* 修改加入話題的狀態
|
||||
*
|
||||
* @param position
|
||||
* @param b
|
||||
@@ -535,7 +535,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
public interface OnClick {
|
||||
/**
|
||||
* 点击关注
|
||||
* 點擊關註
|
||||
*
|
||||
* @param position
|
||||
*/
|
||||
@@ -561,7 +561,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param text 文字
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder append(CharSequence text) {
|
||||
if (TextUtils.isEmpty(text)) return this;
|
||||
@@ -571,7 +571,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param drawable -icon url
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder appendImg(String drawable) {
|
||||
if (TextUtils.isEmpty(drawable)) return this;
|
||||
@@ -584,9 +584,9 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param drawable -icon url
|
||||
* @param width 宽
|
||||
* @param width 寬
|
||||
* @param height 高
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder append(String drawable, int width, int height) {
|
||||
if (TextUtils.isEmpty(drawable)) return this;
|
||||
@@ -598,7 +598,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 文本和背景分离的情况
|
||||
* 文本和背景分離的情況
|
||||
*/
|
||||
public SpannableBuilder appendBgAndContent(String drawable, String content) {
|
||||
if (TextUtils.isEmpty(drawable)) return this;
|
||||
@@ -611,9 +611,9 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param drawable -icon
|
||||
* @param width 宽
|
||||
* @param width 寬
|
||||
* @param height 高
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder append(Drawable drawable, int width, int height) {
|
||||
if (drawable == null) return this;
|
||||
@@ -627,7 +627,7 @@ public class MessageView extends FrameLayout {
|
||||
/**
|
||||
* @param imgUrl -icon url
|
||||
* @param height 高
|
||||
* @return -返回一个spannableStringBuilder,自适应宽度
|
||||
* @return -返回一個spannableStringBuilder,自適應寬度
|
||||
*/
|
||||
public SpannableBuilder append(String imgUrl, int height) {
|
||||
if (TextUtils.isEmpty(imgUrl)) return this;
|
||||
@@ -640,9 +640,9 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param drawable -icon
|
||||
* @param width 宽
|
||||
* @param width 寬
|
||||
* @param height 高
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder append(Drawable drawable, int width, int height, Object... whats) {
|
||||
if (drawable == null) return this;
|
||||
@@ -664,8 +664,8 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
/**
|
||||
* @param text -文字
|
||||
* @param what -span类型
|
||||
* @return -返回一个spannableStringBuilder
|
||||
* @param what -span類型
|
||||
* @return -返回一個spannableStringBuilder
|
||||
*/
|
||||
public SpannableBuilder append(CharSequence text, Object what) {
|
||||
if (TextUtils.isEmpty(text)) return this;
|
||||
@@ -676,7 +676,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 支持多个spannable 对同一段文字修改
|
||||
* 支持多個spannable 對同一段文字修改
|
||||
*
|
||||
* @param text
|
||||
* @param what
|
||||
@@ -742,7 +742,7 @@ public class MessageView extends FrameLayout {
|
||||
try {
|
||||
if (chatRoomMessage.getMsgType() == MsgTypeEnum.tip) {
|
||||
String contentText = chatRoomMessage.getContent();
|
||||
// 房间通告
|
||||
// 房間通告
|
||||
if (ResUtil.getString(R.string.avroom_widget_messageview_03).equals(contentText)) {
|
||||
setUpdateGiftEffectMsg(tvContent);
|
||||
} else if (XChatConstants.ROOM_INTRODUCTION.equals(contentText) || contentText.contains(IMNetEaseManager.ROOM_INTRO_TAG)) {
|
||||
@@ -752,7 +752,7 @@ public class MessageView extends FrameLayout {
|
||||
contentText.contains(XChatConstants.DATING_TIPS_IN) ||
|
||||
contentText.contains(XChatConstants.DATING_TIPS_NEW) ||
|
||||
contentText.contains(XChatConstants.DATING_TIPS_PUBLIC)) {
|
||||
//相亲模式提示文案用特殊的颜色
|
||||
//相親模式提示文案用特殊的顏色
|
||||
tvContent.setTextColor(ContextCompat.getColor(mContext, R.color.color_fe5d7f));
|
||||
tvContent.setText(contentText);
|
||||
} else {
|
||||
@@ -763,7 +763,7 @@ public class MessageView extends FrameLayout {
|
||||
setMsgText(chatRoomMessage, tvContent);
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
} else if (chatRoomMessage.getMsgType() == MsgTypeEnum.notification) {
|
||||
// 加上勋章
|
||||
// 加上勛章
|
||||
setMsgNotification(chatRoomMessage, tvContent, baseViewHolder.getAdapterPosition());
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
} else if (chatRoomMessage.getMsgType() == MsgTypeEnum.custom) {
|
||||
@@ -777,17 +777,17 @@ public class MessageView extends FrameLayout {
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_GIFT) {
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_GIFT) {
|
||||
// 加上勋章
|
||||
// 加上勛章
|
||||
setMsgHeaderGift(tvContent, (GiftAttachment) attachment, chatRoomMessage);
|
||||
} else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_LUCKY_GIFT) {
|
||||
setMsgBatchLuckyBagGift(tvContent, (MultiLuckyGiftAttachment) attachment, chatRoomMessage);
|
||||
}
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MULTI_GIFT) {
|
||||
if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_MULTI_GIFT) {
|
||||
// 加上勋章
|
||||
// 加上勛章
|
||||
setMsgMultiGift(tvContent, (MultiGiftAttachment) attachment, chatRoomMessage);
|
||||
} else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_ALL_MIC_LUCKY_GIFT) {
|
||||
//福袋礼物公屏
|
||||
//福袋禮物公屏
|
||||
setMsgAllMicLuckyBagGift(tvContent, (MultiLuckyGiftAttachment) attachment, chatRoomMessage);
|
||||
} else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_BATCH_SEND_GIFT) {
|
||||
setMsgBatchGift(tvContent, (GiftBatchAttachment) attachment, chatRoomMessage);
|
||||
@@ -797,14 +797,14 @@ public class MessageView extends FrameLayout {
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_FACE) {
|
||||
tvContent.setLineSpacing(Utils.dip2px(mContext, 6), 1);
|
||||
// 加上勋章
|
||||
// 加上勛章
|
||||
setMsgFace(tvContent, (FaceAttachment) attachment, chatRoomMessage);
|
||||
// 设置贵族气泡
|
||||
// 設置貴族氣泡
|
||||
List<FaceReceiveInfo> faceReceiveInfos = ((FaceAttachment) attachment).getFaceReceiveInfos();
|
||||
if (faceReceiveInfos.size() == 1 && chatRoomMessage.getFromAccount().equals(String.valueOf(faceReceiveInfos.get(0).getUid())))
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MESS_HEAD_NOBLE) {
|
||||
// 开通或续费贵族通知
|
||||
// 開通或續費貴族通知
|
||||
setMsgNobleOpenOrRenewText(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_SEND_MAGIC) {
|
||||
if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_SINGLE_MAGIC) {
|
||||
@@ -920,7 +920,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_SIGN_IN
|
||||
&& second == CustomAttachment.CUSTOM_MSG_SUB_CARVE_UP_GOLD_SECOND_LEVEL) {
|
||||
//二级瓜分钻石
|
||||
//二級瓜分鉆石
|
||||
setCarveUpGoldMsg(chatRoomMessage, tvContent);
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_MINI_WORLD) {
|
||||
switch (second) {
|
||||
@@ -944,12 +944,12 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_PUBLIC_SCREEN) {
|
||||
if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_PUBLIC_SCREEN_WELCOME) {
|
||||
//麦上用户对你的欢迎语
|
||||
//麥上用戶對你的歡迎語
|
||||
setMicWelcomeContent(chatRoomMessage, tvContent, baseViewHolder.getAdapterPosition());
|
||||
}
|
||||
} else if (first == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_FOLLOW_ROOM) {
|
||||
if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_FOLLOW_ROOM_SUCCESS) {
|
||||
//收藏了房间
|
||||
//收藏了房間
|
||||
setFollowRoomTip(tvContent, (RoomTipAttachment) attachment, chatRoomMessage);
|
||||
setVIPMessageBackground(chatRoomMessage, tvContent);
|
||||
}
|
||||
@@ -1218,7 +1218,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示已经加入的话题的通知
|
||||
* 提示已經加入的話題的通知
|
||||
*
|
||||
* @param adapterPosition
|
||||
* @param chatRoomMessage
|
||||
@@ -1300,7 +1300,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 提示加入话题
|
||||
* 提示加入話題
|
||||
*
|
||||
* @param adapterPosition
|
||||
* @param chatRoomMessage
|
||||
@@ -1320,7 +1320,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间公屏提示关注房主
|
||||
* 房間公屏提示關註房主
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
* @param tvContent
|
||||
@@ -1365,7 +1365,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 房间公屏提示关注房主
|
||||
* 房間公屏提示關註房主
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
* @param tvContent
|
||||
@@ -1390,7 +1390,7 @@ public class MessageView extends FrameLayout {
|
||||
Iterator<Map.Entry<String, RoomPKInvitedUpMicMember>> iterator = micMemberMap.entrySet().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
RoomPKInvitedUpMicMember value = iterator.next().getValue();
|
||||
//没有队伍的不提示
|
||||
//沒有隊伍的不提示
|
||||
if (value.getGroupType() == PKTeamInfo.TEAM_NONE) {
|
||||
continue;
|
||||
}
|
||||
@@ -1662,7 +1662,7 @@ public class MessageView extends FrameLayout {
|
||||
msg = msg + (integer + 1 - faceInfoById.getResultIndexStart()) + ",";
|
||||
}
|
||||
msg = msg.substring(0, msg.length() - 1);
|
||||
// 内容
|
||||
// 內容
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(extension == null ? ResUtil.getString(R.string.avroom_widget_messageview_091) : RegexUtil.getPrintableString(extension.getSenderNick()), new ForegroundColorSpan(Color.WHITE),
|
||||
new OriginalDrawStatusClickSpan() {
|
||||
@@ -1684,7 +1684,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
private void setBoxMeMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
||||
// 内容
|
||||
// 內容
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_093), new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
|
||||
@@ -1701,7 +1701,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
private void setRadishMeMsg(ChatRoomMessage chatRoomMessage, TextView tvContent) {
|
||||
RoomBoxPrizeAttachment attachment = (RoomBoxPrizeAttachment) chatRoomMessage.getAttachment();
|
||||
// 内容
|
||||
// 內容
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(ResUtil.getString(R.string.avroom_widget_messageview_097), new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
|
||||
@@ -1745,7 +1745,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
private void setCleanScreenMsg(TextView tvContent, IMMessage message) {
|
||||
CleanScreenAttachment attachment = (CleanScreenAttachment) message.getAttachment();
|
||||
// 内容
|
||||
// 內容
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(attachment.getRoleType() == 1 ? ResUtil.getString(R.string.avroom_widget_messageview_0105) : ResUtil.getString(R.string.avroom_widget_messageview_0106), new ForegroundColorSpan(Color.WHITE))
|
||||
.append("(" + attachment.getNick() + ") ", new ForegroundColorSpan(roomTipColor),
|
||||
@@ -1771,8 +1771,8 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 排麦模式中,用户被管理员抱上麦
|
||||
* 格式:管理员/房主将{用户昵称}抱上麦
|
||||
* 排麥模式中,用戶被管理員抱上麥
|
||||
* 格式:管理員/房主將{用戶昵稱}抱上麥
|
||||
*
|
||||
* @param tvContent
|
||||
* @param attachment
|
||||
@@ -1876,7 +1876,7 @@ public class MessageView extends FrameLayout {
|
||||
private void clearBackground(TextView textView) {
|
||||
// 清除文字
|
||||
textView.setText("");
|
||||
// 清除聊天气泡
|
||||
// 清除聊天氣泡
|
||||
textView.setBackgroundResource(R.drawable.shape_room_message_bg);
|
||||
textView.setPadding(paddingWidth, paddingHeight, paddingWidth, paddingHeight);
|
||||
}
|
||||
@@ -1889,7 +1889,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}{level}xxx: 文字内容
|
||||
* {badge}{level}xxx: 文字內容
|
||||
*
|
||||
* @param chatRoomMessage -
|
||||
* @param tvContent -
|
||||
@@ -1907,7 +1907,7 @@ public class MessageView extends FrameLayout {
|
||||
for (int i = 0; i < atUids.size(); i++) {
|
||||
String name = atNames.get(i);
|
||||
String uid = atUids.get(i);
|
||||
// 只有当被 @ 人的数组中包含自己的时候才会去变色
|
||||
// 只有當被 @ 人的數組中包含自己的時候才會去變色
|
||||
if (Objects.equals(uid, String.valueOf(AuthModel.get().getCurrentUid()))) {
|
||||
Pattern pattern = Pattern.compile(Pattern.quote(name));
|
||||
Matcher matcher = pattern.matcher(text.build().toString());
|
||||
@@ -1948,7 +1948,7 @@ public class MessageView extends FrameLayout {
|
||||
R.drawable.ic_room_super_admin, null) : null,
|
||||
SizeUtils.dp2px(tvContent.getContext(), 23), expLevelHeight);
|
||||
|
||||
// 官方主播认证
|
||||
// 官方主播認證
|
||||
String tvOfficialMask = NobleUtil.getLevel(UserInfo.OAC_NAME, chatRoomMessage).trim();
|
||||
String ivOfficialMask = NobleUtil.getLevel(UserInfo.OAC_ICON, chatRoomMessage);
|
||||
if (!TextUtils.isEmpty(tvOfficialMask) && !TextUtils.isEmpty(ivOfficialMask) && extension != null) { // extension != null 表示自己
|
||||
@@ -1956,9 +1956,9 @@ public class MessageView extends FrameLayout {
|
||||
} else if (!TextUtils.isEmpty(ivOfficialMask)) {
|
||||
builder.append(ivOfficialMask, SizeUtils.dp2px(tvContent.getContext(), 62), expLevelHeight);
|
||||
}
|
||||
//等级
|
||||
//等級
|
||||
builder.append(userLevel, expLevelWidth, expLevelHeight);
|
||||
//铭牌
|
||||
//銘牌
|
||||
String tvNamePlate = NobleUtil.getNamePlate(UserInfo.NAMEPLATE_WORD, chatRoomMessage).trim();
|
||||
String ivNamePlate = NobleUtil.getNamePlate(UserInfo.NAMEPLATE_PIC, chatRoomMessage);
|
||||
if (!TextUtils.isEmpty(tvNamePlate) && !TextUtils.isEmpty(ivNamePlate)) { // extension != null 表示自己
|
||||
@@ -1969,7 +1969,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂时已抛弃
|
||||
* 暫時已拋棄
|
||||
*
|
||||
* @param chatRoomMessage -
|
||||
* @param tvContent -
|
||||
@@ -1999,8 +1999,8 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* xxx 分享了房间
|
||||
* xxx 关注了房主
|
||||
* xxx 分享了房間
|
||||
* xxx 關註了房主
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param roomTipAttachment -
|
||||
@@ -2016,7 +2016,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* xxx 收藏了房间
|
||||
* xxx 收藏了房間
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param roomTipAttachment -
|
||||
@@ -2031,7 +2031,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}{level} xxx 出 运气表情
|
||||
* {badge}{level} xxx 出 運氣表情
|
||||
* <p>
|
||||
* {badge}{level} xxx 出
|
||||
* 表情1 表情2 表情3 表情4 表情5
|
||||
@@ -2060,7 +2060,7 @@ public class MessageView extends FrameLayout {
|
||||
// 骰子
|
||||
if (faceInfo.getId() == 17 || "shaizi".equals(faceInfo.getENName()))
|
||||
height = (int) (width / 1.36F);
|
||||
// 纸牌
|
||||
// 紙牌
|
||||
if (faceInfo.getId() == 24 || "pukepai".equals(faceInfo.getENName())) {
|
||||
width = smallFace;
|
||||
height = (int) (width / 0.7F);
|
||||
@@ -2073,7 +2073,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* xxx 全麦送出 {礼物} X数量
|
||||
* xxx 全麥送出 {禮物} X數量
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param giftAttachment -
|
||||
@@ -2102,8 +2102,8 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 全麦福袋礼物
|
||||
* xxx 全麦送出 {礼物} X数量
|
||||
* 全麥福袋禮物
|
||||
* xxx 全麥送出 {禮物} X數量
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param giftAttachment -
|
||||
@@ -2157,8 +2157,8 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送多人福袋礼物
|
||||
* xxx 全麦送出 {礼物} X数量
|
||||
* 發送多人福袋禮物
|
||||
* xxx 全麥送出 {禮物} X數量
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param giftAttachment -
|
||||
@@ -2214,7 +2214,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* xxx 送给xxx,xxx,xxx... {礼物} X数量
|
||||
* xxx 送給xxx,xxx,xxx... {禮物} X數量
|
||||
*
|
||||
* @param tvContent
|
||||
* @param attachment
|
||||
@@ -2258,7 +2258,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}xxx给全麦施魔法{魔法}
|
||||
* {badge}xxx給全麥施魔法{魔法}
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param magicAllMicAttachment -
|
||||
@@ -2290,7 +2290,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* xxx 送给xxx,xxx,xxx... {魔法} X数量
|
||||
* xxx 送給xxx,xxx,xxx... {魔法} X數量
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param magicBatchAttachment -
|
||||
@@ -2343,7 +2343,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}xxx给{badge}xxx施魔法{魔法}
|
||||
* {badge}xxx給{badge}xxx施魔法{魔法}
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param magicAttachment -
|
||||
@@ -2387,7 +2387,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}xxx送给{badge}xxx {礼物} X数量
|
||||
* {badge}xxx送給{badge}xxx {禮物} X數量
|
||||
*
|
||||
* @param tvContent -
|
||||
* @param giftAttachment -
|
||||
@@ -2428,7 +2428,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* {badge}xxx来了
|
||||
* {badge}xxx來了
|
||||
*
|
||||
* @param chatRoomMessage -
|
||||
* @param tvContent -
|
||||
@@ -2450,7 +2450,7 @@ public class MessageView extends FrameLayout {
|
||||
senderNick = RegexUtil.getPrintableString(attachment.getTargetNicks().get(0));
|
||||
if (attachment.getType() != NotificationType.ChatRoomMemberIn) return;
|
||||
|
||||
// 座驾
|
||||
// 座駕
|
||||
String carName = NobleUtil.getCarName(CarInfo.CAR_NAME, chatRoomMessage);
|
||||
carName = TextUtils.isEmpty(carName) ? "" : "\"" + carName + "\"";
|
||||
|
||||
@@ -2505,7 +2505,7 @@ public class MessageView extends FrameLayout {
|
||||
|
||||
text.append(enterText, new ForegroundColorSpan(whiteColor));
|
||||
|
||||
//如果自己在麦上,增加一个欢迎ta的按钮,并且这条消息不是自己的
|
||||
//如果自己在麥上,增加一個歡迎ta的按鈕,並且這條消息不是自己的
|
||||
if (AvRoomDataManager.get().isOwnerOnMic()
|
||||
&& !UserModel.get().isMyseft(chatRoomMessage.getFromAccount())
|
||||
&& !ExtensionUtil.isWelcomeLocal(chatRoomMessage)) {
|
||||
@@ -2563,7 +2563,7 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
/**
|
||||
* 恭喜 xxx 在房间内 续费/开通 "皇帝"
|
||||
* 恭喜 xxx 在房間內 續費/開通 "皇帝"
|
||||
*
|
||||
* @param chatRoomMessage -
|
||||
* @param tvContent -
|
||||
@@ -2579,21 +2579,21 @@ public class MessageView extends FrameLayout {
|
||||
&& second != CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE)
|
||||
return;
|
||||
String senderNick = RegexUtil.getPrintableString(attachment.nick);
|
||||
// 系统通知icon
|
||||
// 系統通知icon
|
||||
Drawable icNotification = mContext.getResources().getDrawable(R.drawable.ic_system_notification);
|
||||
int width = (int) (icNotification.getIntrinsicWidth() / (icNotification.getIntrinsicHeight() + 0.F) * sysIconHeight);
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append(icNotification, width, sysIconHeight)
|
||||
.append(" 恭喜 ", new ForegroundColorSpan(greyColor))
|
||||
.append(senderNick, new ForegroundColorSpan(roomTipColor))
|
||||
.append(" 在房间内" + (second == CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE ? "续费" : "开通") + "\"", new ForegroundColorSpan(greyColor))
|
||||
.append(" 在房間內" + (second == CustomAttachment.CUSTOM_MESS_SUB_RENEWNOBLE ? "續費" : "開通") + "\"", new ForegroundColorSpan(greyColor))
|
||||
.append(nobleInfo.getName(), new ForegroundColorSpan(roomTipColor))
|
||||
.append("\"");
|
||||
tvContent.setText(text.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 瓜分钻石的消息,二级和三级都有
|
||||
* 瓜分鉆石的消息,二級和三級都有
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
* @param tvContent
|
||||
@@ -2603,18 +2603,18 @@ public class MessageView extends FrameLayout {
|
||||
return;
|
||||
}
|
||||
CarveUpGoldAttachment attachment = (CarveUpGoldAttachment) chatRoomMessage.getAttachment();
|
||||
// 内容
|
||||
// 內容
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent)
|
||||
.append("【签到瓜分百万】哇塞,恭喜 ", new ForegroundColorSpan(greyColor))
|
||||
.append("【簽到瓜分百萬】哇塞,恭喜 ", new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getNick() + " ", new ForegroundColorSpan(roomTipColor))
|
||||
.append("签到获得 ", new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getGoldNum() + "钻石", new ForegroundColorSpan(roomTipColor))
|
||||
.append("簽到獲得 ", new ForegroundColorSpan(greyColor))
|
||||
.append(attachment.getGoldNum() + "鉆石", new ForegroundColorSpan(roomTipColor))
|
||||
.append("!", new ForegroundColorSpan(greyColor));
|
||||
tvContent.setText(text.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 麦上用户对你的欢迎语
|
||||
* 麥上用戶對你的歡迎語
|
||||
*/
|
||||
private void setMicWelcomeContent(ChatRoomMessage chatRoomMessage, TextView tvContent, int position) {
|
||||
tvContent.setOnClickListener(null);
|
||||
@@ -2628,7 +2628,7 @@ public class MessageView extends FrameLayout {
|
||||
return;
|
||||
}
|
||||
ChatRoomMessageExtension extension = chatRoomMessage.getChatRoomMessageExtension();
|
||||
// 内容
|
||||
// 內容
|
||||
String fromAccount = chatRoomMessage.getFromAccount();
|
||||
SpannableBuilder text = new SpannableBuilder(tvContent);
|
||||
addCommonTag(chatRoomMessage, text, tvContent);
|
||||
@@ -2652,8 +2652,8 @@ public class MessageView extends FrameLayout {
|
||||
})
|
||||
.append(welcomeInfo.getNextContent(), new ForegroundColorSpan(whiteColor));
|
||||
|
||||
//自己的消息不显示关注按钮
|
||||
//被欢迎人必须是自己
|
||||
//自己的消息不顯示關註按鈕
|
||||
//被歡迎人必須是自己
|
||||
if (!UserModel.get().isMyseft(fromAccount) && UserModel.get().isMyseft(welcomeInfo.getTargetUid())) {
|
||||
if (!welcomeInfo.isFans()) {
|
||||
text.append(" ").append(
|
||||
@@ -2669,10 +2669,10 @@ public class MessageView extends FrameLayout {
|
||||
}
|
||||
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_ROOM_FOLLOW_HIM, "关注TA");
|
||||
StatisticsProtocol.EVENT_ROOM_FOLLOW_HIM, "關註TA");
|
||||
|
||||
welcomeInfo.setConnecting(true);
|
||||
//关注
|
||||
//關註
|
||||
PraiseModel.get().praise(JavaUtil.str2long(chatRoomMessage.getFromAccount()), true)
|
||||
.compose(RxHelper.bindContext(mContext))
|
||||
.subscribe(new DontWarnObserver<String>() {
|
||||
@@ -2739,7 +2739,7 @@ public class MessageView extends FrameLayout {
|
||||
if (handleUid > 0) {
|
||||
account = ((RoomQueueMsgAttachment) attachment).handleUid + "";
|
||||
} else {
|
||||
//ios没用handleUid,导致iOS发的自定义消息,拿不到uid
|
||||
//ios沒用handleUid,導致iOS發的自定義消息,拿不到uid
|
||||
account = chatRoomMessage.getFromAccount();
|
||||
}
|
||||
} else if (attachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_MONSTER_HUNTING) {
|
||||
@@ -2750,7 +2750,7 @@ public class MessageView extends FrameLayout {
|
||||
if (!Objects.equals(mCurrentRoomInfo.getUid(), dataBean.getAppearRoomUid())) {
|
||||
AVRoomActivity.start(getContext(), dataBean.getAppearRoomUid());
|
||||
} else {
|
||||
SingleToastUtil.showToast("你已经在怪兽房间内");
|
||||
SingleToastUtil.showToast("你已經在怪獸房間內");
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -62,7 +62,7 @@ import java.net.URL
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* 房间特效View(座驾,心动场景,飘屏等)
|
||||
* 房間特效View(座駕,心動場景,飄屏等)
|
||||
*/
|
||||
class RoomEffectView @JvmOverloads constructor(
|
||||
private val mContext: Context,
|
||||
@@ -71,10 +71,10 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
) : FrameLayout(mContext, attrs, defStyleAttr) {
|
||||
private val mCarEffectList: MutableList<CarInfo?> by lazy { ArrayList() }
|
||||
|
||||
//顶部飘屏总展示时间
|
||||
//頂部飄屏總展示時間
|
||||
private val SHOW_TIME = 3500
|
||||
|
||||
//顶部飘屏周期
|
||||
//頂部飄屏周期
|
||||
private val PERIOD = 1000
|
||||
private val binding: LayoutRoomEffectBinding =
|
||||
LayoutRoomEffectBinding.inflate(LayoutInflater.from(mContext), this, true)
|
||||
@@ -157,10 +157,10 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
RoomEvent.RADISH_NOTIFY_SVGA -> addRadishNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ROOM_GIFT_COMPOUND -> addGiftCompoundNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.RECEIVE_ROOM_LUCKY_BAG_NOTICE, RoomEvent.RECEIVE_SERVICE_LUCKY_BAG_NOTICE -> //全服福袋
|
||||
//厅内福袋
|
||||
//廳內福袋
|
||||
addLuckyBagNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.DATING_PUBLISH_RESULT -> showHandAnim((roomEvent.chatRoomMessage.attachment as DatingAttachment).datingNotifyInfo)
|
||||
RoomEvent.RECEIVE_MEMBER_IN_NOTICE -> //进入房间
|
||||
RoomEvent.RECEIVE_MEMBER_IN_NOTICE -> //進入房間
|
||||
addMemberInNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.RECEIVE_EXPER_LEVEL_UP_NOTICE -> addLevelUpNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ENTER_ROOM -> if (!SuperAdminUtil.isSuperAdmin()) {
|
||||
@@ -214,7 +214,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏
|
||||
* 幸運池飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -239,7 +239,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
val attachment = chatRoomMessage.attachment as DatingAllNotifyAttachment
|
||||
val (_, _, oneUserNick, anotherUserNick, roomUid, roomTitle, backgroundUrl, joinHandLevel, _, sweetWords) = attachment.datingAllNotifyInfo
|
||||
?: return
|
||||
//自己房间不需要飘
|
||||
//自己房間不需要飄
|
||||
if (AvRoomDataManager.get().roomUid == roomUid) return
|
||||
val textView = LayoutInflater.from(mContext)
|
||||
.inflate(R.layout.layout_room_dating_all_notify, null) as TextView
|
||||
@@ -285,7 +285,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 开福袋飘屏
|
||||
* 開福袋飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -341,8 +341,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
binding.flLuckyGiftNotify.addView(svgaImageView)
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
@@ -360,7 +360,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
dynamicEntity.setHidden(true, "img_206")
|
||||
} else {
|
||||
svgaImageView.setOnClickListener {
|
||||
//跳转房间要移除监听,不然可能NPE
|
||||
//跳轉房間要移除監聽,不然可能NPE
|
||||
svgaImageView.callback = null
|
||||
AVRoomActivity.start(mContext, noticeInfo.roomUid)
|
||||
}
|
||||
@@ -382,7 +382,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏
|
||||
* 幸運池飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -432,7 +432,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏 五级 SVGA背景的
|
||||
* 幸運池飄屏 五級 SVGA背景的
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -484,8 +484,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
@@ -509,7 +509,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏
|
||||
* 幸運池飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -560,8 +560,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加跑马灯
|
||||
* 以及反射一些参数影响跑马灯
|
||||
* 添加跑馬燈
|
||||
* 以及反射一些參數影響跑馬燈
|
||||
*/
|
||||
private fun setupRoomTitleMarquee(textView: TextView) {
|
||||
try {
|
||||
@@ -581,7 +581,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 幸运池飘屏 五级 SVGA背景的
|
||||
* 幸運池飄屏 五級 SVGA背景的
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -635,8 +635,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
@@ -661,7 +661,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
|
||||
|
||||
/**
|
||||
* 礼物合成,带SVGA背景的消息
|
||||
* 禮物合成,帶SVGA背景的消息
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -713,8 +713,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
override fun onComplete(videoItem: SVGAVideoEntity) {
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 24f //字体大小
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 24f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text.build(),
|
||||
@@ -740,7 +740,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 成员进入飘屏
|
||||
* 成員進入飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -770,7 +770,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
val fromNick = remoteExtension["fromNick"] as String?
|
||||
val textView = LayoutInflater.from(mContext)
|
||||
.inflate(R.layout.layout_member_in_notify, null) as SuperTextView
|
||||
// 内容
|
||||
// 內容
|
||||
val text = MessageView.SpannableBuilder(textView)
|
||||
.append(targetNicks[0], ForegroundColorSpan(Color.WHITE))
|
||||
var enterText = ResUtil.getString(R.string.avroom_widget_roomeffectview_018)
|
||||
@@ -847,8 +847,8 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
binding.roomMenberInSvga.clearsAfterStop = true
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 22f //字体大小
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 22f //字體大小
|
||||
dynamicEntity.setDynamicText(
|
||||
StaticLayout(
|
||||
text,
|
||||
@@ -868,7 +868,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 升级飘屏
|
||||
* 升級飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -906,9 +906,9 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
binding.roomLevelUpSvga.clearsAfterStop = true
|
||||
val dynamicEntity = SVGADynamicEntity()
|
||||
val textPaint = TextPaint()
|
||||
textPaint.color = Color.WHITE //字体颜色
|
||||
textPaint.textSize = 22f //字体大小 Util.dip2px(mContext,11)
|
||||
// textPaint.setShadowLayer(3, 2, 2, 0xff000000);//字体阴影,不需要可以不用设置
|
||||
textPaint.color = Color.WHITE //字體顏色
|
||||
textPaint.textSize = 22f //字體大小 Util.dip2px(mContext,11)
|
||||
// textPaint.setShadowLayer(3, 2, 2, 0xff000000);//字體陰影,不需要可以不用設置
|
||||
dynamicEntity.setDynamicText(message, textPaint, "y_yhname")
|
||||
val drawable = SVGADrawable(videoItem, dynamicEntity)
|
||||
binding.roomLevelUpSvga.setImageDrawable(drawable)
|
||||
@@ -1038,7 +1038,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
.subscribe { aLong: Long ->
|
||||
val residueTime = datingNotifyInfo.svgaSecond - aLong
|
||||
binding.tvDatingSecond.text = residueTime.toString() + "S"
|
||||
if (residueTime == 5L) { //剩余5秒开始显示倒计时
|
||||
if (residueTime == 5L) { //剩余5秒開始顯示倒計時
|
||||
binding.llDatingSvgaTime.visibility = VISIBLE
|
||||
}
|
||||
}
|
||||
@@ -1059,12 +1059,12 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
if (isSendMsg) {
|
||||
UserModel.get().getUserInfoFromServer(account?.toLong() ?: 0)
|
||||
.subscribe { userInfo: UserInfo? ->
|
||||
//播放座驾动效
|
||||
//播放座駕動效
|
||||
if (userInfo != null && userInfo.carInfo != null && userInfo.carInfo.isUsing
|
||||
&& userInfo.carInfo.getStatus() == CarInfo.STATUS_USER_CAN_USE
|
||||
) {
|
||||
|
||||
// 贵族人员,要先判断是否隐身
|
||||
// 貴族人員,要先判斷是否隱身
|
||||
if (userInfo.userVipInfoVO == null || !userInfo.userVipInfoVO.enterHide) {
|
||||
if (AvRoomDataManager.get().mIsNeedGiftEffect &&
|
||||
!AvRoomDataManager.get().isSelfGamePlaying &&
|
||||
@@ -1072,12 +1072,12 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
) {
|
||||
mCarEffectList.add(userInfo.carInfo)
|
||||
if (!binding.roomCarSvga.isAnimating && !isSvgaPlaying) {
|
||||
// 播放座驾动画
|
||||
// 播放座駕動畫
|
||||
playCarAnim(userInfo.carInfo)
|
||||
}
|
||||
}
|
||||
|
||||
// 公屏进入房间的提示语
|
||||
// 公屏進入房間的提示語
|
||||
IMNetEaseManager.get()
|
||||
.sendCarPlayRoomMsgBySdk(
|
||||
userInfo.carInfo,
|
||||
@@ -1112,7 +1112,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 真实播放svga
|
||||
* 真實播放svga
|
||||
*
|
||||
* @param effect
|
||||
*/
|
||||
@@ -1149,7 +1149,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 真实播放vap
|
||||
* 真實播放vap
|
||||
*
|
||||
* @param viewUrl
|
||||
*/
|
||||
@@ -1166,7 +1166,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 跨房PK飘屏
|
||||
* 跨房PK飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -1212,7 +1212,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* 个播跨房PK飘屏
|
||||
* 個播跨房PK飄屏
|
||||
*
|
||||
* @param chatRoomMessage
|
||||
*/
|
||||
@@ -1289,7 +1289,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
val textView = rootView.findViewById<TextView>(R.id.tv_content)
|
||||
val text = MessageView.SpannableBuilder(textView)
|
||||
.append(ResUtil.getString(R.string.avroom_widget_roomeffectview_025), ForegroundColorSpan(Color.WHITE))
|
||||
.append("「${msgBean.title}」房间", ForegroundColorSpan(Color.parseColor("#FFFC4C")))
|
||||
.append("「${msgBean.title}」房間", ForegroundColorSpan(Color.parseColor("#FFFC4C")))
|
||||
.append(msgBean.desc, ForegroundColorSpan(Color.WHITE))
|
||||
.append("TOP1", ForegroundColorSpan(Color.parseColor("#FFFC4C")))
|
||||
textView.text = text.build()
|
||||
|
@@ -51,7 +51,7 @@ public class DialogManager {
|
||||
private boolean mReCreate = true;
|
||||
private TextView mCancel;
|
||||
/**
|
||||
* 新增的一种弹框类型,支持只弹一次
|
||||
* 新增的一種彈框類型,支持只彈一次
|
||||
*/
|
||||
private Switch switchTips;
|
||||
private int mProgressMax = 0;
|
||||
@@ -88,7 +88,7 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 注释 见 {@link DialogManager#showOkCancelDialog(
|
||||
* 註釋 見 {@link DialogManager#showOkCancelDialog(
|
||||
*CharSequence, CharSequence, CharSequence, CharSequence, boolean,
|
||||
* boolean, boolean, OkCancelDialogListener, OnKeyBackListener, boolean)}
|
||||
*/
|
||||
@@ -101,7 +101,7 @@ public class DialogManager {
|
||||
|
||||
Window window = dialog.getWindow();
|
||||
window.setContentView(R.layout.layout_common_ok_cancel_dialog);
|
||||
//标题
|
||||
//標題
|
||||
TextView tvTilte = window.findViewById(R.id.tv_title);
|
||||
if (tvTilte != null) {
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
@@ -111,7 +111,7 @@ public class DialogManager {
|
||||
tvTilte.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
//内容
|
||||
//內容
|
||||
TextView tip = window.findViewById(R.id.message);
|
||||
tip.setText(message);
|
||||
|
||||
@@ -159,7 +159,7 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 注释 见 {@link DialogManager#showOkCancelDialog(
|
||||
* 註釋 見 {@link DialogManager#showOkCancelDialog(
|
||||
*CharSequence, CharSequence, CharSequence, CharSequence, boolean,
|
||||
* boolean, boolean, OkCancelDialogListener, OnKeyBackListener, boolean)}
|
||||
*/
|
||||
@@ -172,7 +172,7 @@ public class DialogManager {
|
||||
|
||||
Window window = dialog.getWindow();
|
||||
window.setContentView(R.layout.layout_newbie_hello_dialog);
|
||||
//头像
|
||||
//頭像
|
||||
RoundedImageView ivAvatar = window.findViewById(R.id.iv_avatar);
|
||||
if (ivAvatar != null) {
|
||||
if (!TextUtils.isEmpty(avatar)) {
|
||||
@@ -188,10 +188,10 @@ public class DialogManager {
|
||||
}
|
||||
}
|
||||
|
||||
//性别
|
||||
//性別
|
||||
ImageView ivGender = window.findViewById(R.id.iv_gender);
|
||||
ivGender.setImageDrawable(gender == 1 ? context.getResources().getDrawable(R.drawable.ic_gender_male) : context.getResources().getDrawable(R.drawable.ic_gender_female));
|
||||
//标题
|
||||
//標題
|
||||
TextView tvTilte = window.findViewById(R.id.tv_title);
|
||||
if (tvTilte != null) {
|
||||
if (!TextUtils.isEmpty(title)) {
|
||||
@@ -201,7 +201,7 @@ public class DialogManager {
|
||||
tvTilte.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
//内容
|
||||
//內容
|
||||
TextView tip = window.findViewById(R.id.message);
|
||||
tip.setText(message);
|
||||
|
||||
@@ -280,19 +280,19 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
public void dismissDialog() {
|
||||
//注释这个判断,因为不保留活动情况下,((Activity)mContext).isDestroyed() 为true 导致不执行dismiss一个dialog
|
||||
//而mDialog.getWindow()不为null,还是可以dismiss一个dialog的。
|
||||
//註釋這個判斷,因為不保留活動情況下,((Activity)mContext).isDestroyed() 為true 導致不執行dismiss一個dialog
|
||||
//而mDialog.getWindow()不為null,還是可以dismiss一個dialog的。
|
||||
// if(!checkActivityValid())
|
||||
// return;
|
||||
//加上一个try,强行吞异常
|
||||
//加上一個try,強行吞異常
|
||||
try {
|
||||
if (mContext != null && mDialog != null && mDialog.getWindow() != null) {
|
||||
if (mContext instanceof Activity) {
|
||||
Activity activity = (Activity) mContext;
|
||||
if (!activity.isFinishing()) {
|
||||
//如果dialog在延时比如handler。postDelay中调用,
|
||||
// 而activity.已经destory,
|
||||
// 会报异常java.lang.IllegalArgumentException:
|
||||
//如果dialog在延時比如handler。postDelay中調用,
|
||||
// 而activity.已經destory,
|
||||
// 會報異常java.lang.IllegalArgumentException:
|
||||
// View not attached to window manager
|
||||
mDialog.dismiss();
|
||||
}
|
||||
@@ -321,8 +321,8 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 只有确定按钮
|
||||
* 带标题
|
||||
* 只有確定按鈕
|
||||
* 帶標題
|
||||
*/
|
||||
public void showOkWithTitleDialog(CharSequence title, CharSequence message,
|
||||
CharSequence okLabel, boolean isCanCancel, OkCancelDialogListener l) {
|
||||
@@ -556,20 +556,20 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1、Peko通用的dialog设置,以后尽量所有的dialog都引到这个方法,方便以后改版
|
||||
* 2、如果UI要求弹框是完全自定义的,再重新写过
|
||||
* 1、Peko通用的dialog設置,以後盡量所有的dialog都引到這個方法,方便以後改版
|
||||
* 2、如果UI要求彈框是完全自定義的,再重新寫過
|
||||
*
|
||||
* @param title 标题,空则隐藏 (ui说,有些弹框带标题,有些不带,两种情况共存)
|
||||
* @param message 内容,不能为空,配合{@link com.yizhuan.erban.utils.SpannableBuilder} 变色使用
|
||||
* @param okLabel ok按钮,不能隐藏,默认为 text="确定"
|
||||
* @param cancelLabel 取消按钮,空则隐藏,一般现在都用text="取消"
|
||||
* @param l 点击监听
|
||||
* @param isCanCancel 点击返回键是否可以取消,默认=false,dialog初始化的时候,为false
|
||||
* (ui说,ture和false根据情况而定,一般自己根据理解选择)
|
||||
* @param canceledOnTouchOutside ture的话,点击背景消失
|
||||
* @param isAutoHide 默认ture,点击按钮的时候,自动隐藏dialog,(暂时用不到属性,放着先)
|
||||
* @param backListener 弹窗返回键的监听
|
||||
* @param dismissAfterBack 点击返回键是否自动dismiss
|
||||
* @param title 標題,空則隱藏 (ui說,有些彈框帶標題,有些不帶,兩種情況共存)
|
||||
* @param message 內容,不能為空,配合{@link com.yizhuan.erban.utils.SpannableBuilder} 變色使用
|
||||
* @param okLabel ok按鈕,不能隱藏,默認為 text="確定"
|
||||
* @param cancelLabel 取消按鈕,空則隱藏,一般現在都用text="取消"
|
||||
* @param l 點擊監聽
|
||||
* @param isCanCancel 點擊返回鍵是否可以取消,默認=false,dialog初始化的時候,為false
|
||||
* (ui說,ture和false根據情況而定,一般自己根據理解選擇)
|
||||
* @param canceledOnTouchOutside ture的話,點擊背景消失
|
||||
* @param isAutoHide 默認ture,點擊按鈕的時候,自動隱藏dialog,(暫時用不到屬性,放著先)
|
||||
* @param backListener 彈窗返回鍵的監聽
|
||||
* @param dismissAfterBack 點擊返回鍵是否自動dismiss
|
||||
*/
|
||||
public void showOkCancelDialog(CharSequence title, CharSequence message, CharSequence okLabel,
|
||||
CharSequence cancelLabel, boolean isCanCancel, boolean canceledOnTouchOutside,
|
||||
@@ -616,7 +616,7 @@ public class DialogManager {
|
||||
public void showOkCancelDialog(CharSequence title, CharSequence message, CharSequence okLabel,
|
||||
CharSequence cancelLabel, boolean isCanCancel,
|
||||
final boolean isAutoHide, final OkCancelDialogListener l) {
|
||||
//一般情况,点击背景和返回键一起处理
|
||||
//一般情況,點擊背景和返回鍵一起處理
|
||||
showOkCancelDialog(title, message, okLabel, cancelLabel, isCanCancel, isCanCancel,
|
||||
isAutoHide, l, null, false);
|
||||
}
|
||||
@@ -633,8 +633,8 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param title 不需要则传空
|
||||
* @param messages 黑色文字和主题色文字轮着来的一个字符串数组
|
||||
* @param title 不需要則傳空
|
||||
* @param messages 黑色文字和主題色文字輪著來的一個字符串數組
|
||||
*/
|
||||
public void showOkCancelDialog(CharSequence title, CharSequence[] messages,
|
||||
CharSequence okLable, CharSequence cancelLable,
|
||||
@@ -654,7 +654,7 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param messages 黑色文字和主题色文字轮着来的一个字符串数组
|
||||
* @param messages 黑色文字和主題色文字輪著來的一個字符串數組
|
||||
*/
|
||||
public void showOkCancelWithTitleDialog(CharSequence[] messages,
|
||||
final OkCancelDialogListener l) {
|
||||
@@ -890,11 +890,11 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
public void showProgressDialog(Context context) {
|
||||
showProgressDialog(context, "请稍后...", mCanceledOnClickBackKey);
|
||||
showProgressDialog(context, "請稍後...", mCanceledOnClickBackKey);
|
||||
}
|
||||
|
||||
public void showProgressDialog(Context context, boolean cancelable) {
|
||||
showProgressDialog(context, "请稍后...", cancelable);
|
||||
showProgressDialog(context, "請稍後...", cancelable);
|
||||
}
|
||||
|
||||
public void showProgressDialog(Context context, String msg) {
|
||||
@@ -920,8 +920,8 @@ public class DialogManager {
|
||||
/**
|
||||
* @param context
|
||||
* @param msg
|
||||
* @param cancelable 点击返回键是否可取消
|
||||
* @param outSideCancelable 点击对话框外部是否可取消
|
||||
* @param cancelable 點擊返回鍵是否可取消
|
||||
* @param outSideCancelable 點擊對話框外部是否可取消
|
||||
* @param listener
|
||||
*/
|
||||
public void showProgressDialog(Context context, String msg, boolean cancelable, boolean outSideCancelable, DialogInterface.OnDismissListener listener) {
|
||||
@@ -973,7 +973,7 @@ public class DialogManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* 加好友或群验证码的对话框
|
||||
* 加好友或群驗證碼的對話框
|
||||
*/
|
||||
public void showInputPwdDialog(String title, String okLabel, String cancelLabel, final String resultCode, final InputPwdDialogListener listener) {
|
||||
|
||||
@@ -997,9 +997,9 @@ public class DialogManager {
|
||||
mDialog.setCancelable(false);
|
||||
mDialog.setCanceledOnTouchOutside(false);
|
||||
|
||||
//只用下面这一行弹出对话框时需要点击输入框才能弹出软键盘
|
||||
//只用下面這一行彈出對話框時需要點擊輸入框才能彈出軟鍵盤
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
//加上下面这一行弹出对话框时软键盘随之弹出
|
||||
//加上下面這一行彈出對話框時軟鍵盤隨之彈出
|
||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
|
||||
if (!TextUtils.isEmpty(title))
|
||||
titleView.setText(title);
|
||||
@@ -1062,7 +1062,7 @@ public class DialogManager {
|
||||
public interface OkCancelDialogListener {
|
||||
|
||||
default void onCancel() {
|
||||
//默认空实现
|
||||
//默認空實現
|
||||
}
|
||||
|
||||
void onOk();
|
||||
|
@@ -88,14 +88,14 @@ class FansTeamJoinActivity : BaseViewBindingActivity<ActivityFansTeamJoinBinding
|
||||
.compose(bindToLifecycle())
|
||||
.handleBeanData()
|
||||
.subscribe({
|
||||
"加入粉丝团成功!".toast()
|
||||
"加入粉絲團成功!".toast()
|
||||
finish()
|
||||
}, { t ->
|
||||
t.message.toast()
|
||||
})
|
||||
|
||||
} ?: run {
|
||||
"数据初始化中,请稍后~".toast()
|
||||
"數據初始化中,請稍後~".toast()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ class FansTeamJoinedActivity : BaseViewBindingActivity<ActivityFansTeamJoinedBin
|
||||
binding.tvFansTeamFansNum.text = "${it.teamNum}人"
|
||||
|
||||
binding.ivMeAvatar.load(it.memberAvatar)
|
||||
binding.tvValue.text = "亲密值Lv.${it.levelSeq}"
|
||||
binding.tvValue.text = "親密值Lv.${it.levelSeq}"
|
||||
binding.tvCurrValue.text = "${it.levelExper}/${it.nextLevelExper}"
|
||||
binding.pbValue.max = it.nextLevelExper
|
||||
binding.pbValue.progress = it.levelExper
|
||||
@@ -90,7 +90,7 @@ class FansTeamJoinedActivity : BaseViewBindingActivity<ActivityFansTeamJoinedBin
|
||||
|
||||
fansTeamViewModel.exitFansTeamLiveData.observe(this) {
|
||||
if (it == true) {
|
||||
"退出粉丝团成功!".toast()
|
||||
"退出粉絲團成功!".toast()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class FansTeamJoinedActivity : BaseViewBindingActivity<ActivityFansTeamJoinedBin
|
||||
popupWindow.dismiss()
|
||||
}
|
||||
contentView.findViewById<View>(R.id.tv_exit).setOnClickListener {
|
||||
dialogManager.showOkCancelDialog("退出后粉丝团后24小时内不能再次加入,确定退出吗?", true) {
|
||||
dialogManager.showOkCancelDialog("退出後粉絲團後24小時內不能再次加入,確定退出嗎?", true) {
|
||||
popupWindow.dismiss()
|
||||
fansTeamViewModel.exitFansTeam()
|
||||
}
|
||||
|
@@ -218,7 +218,7 @@ class AnchorCardView @JvmOverloads constructor(
|
||||
binding.ivAudioControl.setImageResource(R.drawable.ic_skill_play)
|
||||
AudioPlayerHelper.get().playInThread(url, object : OnPlayListener {
|
||||
override fun onError(error: String) {
|
||||
SingleToastUtil.showToast("播放出错,请重试")
|
||||
SingleToastUtil.showToast("播放出錯,請重試")
|
||||
stopAudio()
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ class AnchorCardView @JvmOverloads constructor(
|
||||
})
|
||||
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_PERSONALSHOW_TOP_CARD_VOICE_CLICK, "个播展示卡片播放语音点击")
|
||||
.onEvent(StatisticsProtocol.EVENT_PERSONALSHOW_TOP_CARD_VOICE_CLICK, "個播展示卡片播放語音點擊")
|
||||
}
|
||||
|
||||
private fun stopAudio() {
|
||||
|
@@ -24,8 +24,8 @@ class GiveGoldSuccessActivity : BaseActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_give_gold_success)
|
||||
initTitleBar(ResUtil.getString(R.string.pay_activity_givegoldsuccessactivity_01))
|
||||
tvNickname.text = "转赠给:${intent.getStringExtra("nickname")}"
|
||||
tvGold.text = "${intent.getStringExtra("gold")?.toInt()}钻石"
|
||||
tvNickname.text = "轉贈給:${intent.getStringExtra("nickname")}"
|
||||
tvGold.text = "${intent.getStringExtra("gold")?.toInt()}鉆石"
|
||||
tvSure.setOnClickListener { finish() }
|
||||
}
|
||||
|
||||
|
@@ -56,11 +56,11 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
||||
return@setOnClickListener
|
||||
}
|
||||
var rateGold = gold * initInfo.redEnvelopeConfig.rate / 100
|
||||
GiveGoldPassWordFragment.newInstance(supportFragmentManager, gold.toString(), nick, if (rateGold == 0.0) "" else "手续费:(${initInfo.redEnvelopeConfig.rate.toInt()}%): ${rateGold}钻石")
|
||||
.apply {
|
||||
passWordFragment = this
|
||||
setListener(this@GiveGoldToUserActivity)
|
||||
}
|
||||
GiveGoldPassWordFragment.newInstance(supportFragmentManager, gold.toString(), nick, if (rateGold == 0.0) "" else "手續費:(${initInfo.redEnvelopeConfig.rate.toInt()}%): ${rateGold}鉆石")
|
||||
.apply {
|
||||
passWordFragment = this
|
||||
setListener(this@GiveGoldToUserActivity)
|
||||
}
|
||||
}
|
||||
}
|
||||
tvCoin.text = PayModel.get().currentWalletInfo?.canGiveGoldNum?.toString() ?: "0"
|
||||
@@ -77,18 +77,18 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
||||
userInfo?.apply {
|
||||
dialogManager.showProgressDialog(context)
|
||||
PayModel.get().giveGold(uid, editGold.text.toString(), password)
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError {
|
||||
toast(it.message)
|
||||
passWordFragment?.password?.clearPassword()
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
.subscribe { _ ->
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
dialogManager.dismissDialog()
|
||||
finish()
|
||||
GiveGoldSuccessActivity.start(context, editGold.text.toString(), nick)
|
||||
}
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError {
|
||||
toast(it.message)
|
||||
passWordFragment?.password?.clearPassword()
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
.subscribe { _ ->
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
dialogManager.dismissDialog()
|
||||
finish()
|
||||
GiveGoldSuccessActivity.start(context, editGold.text.toString(), nick)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ object CpViewHelper {
|
||||
}
|
||||
|
||||
fun setInviteTimeRemain(time: String, tv: TextView) {
|
||||
val s = "请在${time}内决定,过期自动失效!"
|
||||
val s = "請在${time}內決定,過期自動失效!"
|
||||
tv.text = getColorSpan(s, Color.parseColor("#FB466A"), 2, time.length + 2)
|
||||
}
|
||||
|
||||
@@ -106,6 +106,6 @@ object CpViewHelper {
|
||||
message.length,
|
||||
SpannableStringBuilder.SPAN_INCLUSIVE_INCLUSIVE
|
||||
)
|
||||
DialogManager(context).showOkCancelDialog(title, builder, "确定", "取消", true, listener)
|
||||
DialogManager(context).showOkCancelDialog(title, builder, "確定", "取消", true, listener)
|
||||
}
|
||||
}
|
@@ -30,7 +30,7 @@ import org.greenrobot.eventbus.ThreadMode
|
||||
class CpInviteRecordActivity : BaseBindingActivity<ActivityCpInviteRecordBinding>() {
|
||||
private val vm: CpViewModel by viewModels()
|
||||
private lateinit var adapter: InviteRecordAdapter
|
||||
private val type = 1// 1-别人给我发的邀请,2-我给别人发的邀请
|
||||
private val type = 1// 1-別人給我發的邀請,2-我給別人發的邀請
|
||||
|
||||
override fun init() {
|
||||
initTitleBar(ResUtil.getString(R.string.cp_activity_cpinviterecordactivity_01))
|
||||
@@ -107,12 +107,12 @@ class CpInviteRecordActivity : BaseBindingActivity<ActivityCpInviteRecordBinding
|
||||
|
||||
private fun showConfirmDialog(item: CpInviteDetailEntity, isAgree: Boolean) {
|
||||
val shb = CpViewHelper.getColorSpan(
|
||||
"是否${if (isAgree) "同意" else "拒绝"}与${item.inviteNick}成为CP?\n",
|
||||
"是否${if (isAgree) "同意" else "拒絕"}與${item.inviteNick}成為CP?\n",
|
||||
Color.parseColor("#4C5AF1"),
|
||||
5, 5 + item.inviteNick.length
|
||||
)
|
||||
if (isAgree) {
|
||||
val str = "(同意将自动拒绝其他邀请)"
|
||||
val str = "(同意將自動拒絕其他邀請)"
|
||||
val append = CpViewHelper.getSizeSpan(str, 12f, 0, str.length)
|
||||
shb.append(append)
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ class CpInviteReplyDialog(context: Context) :
|
||||
private fun setPage(data: CpInviteDetailEntity) {
|
||||
|
||||
binding.tvDialogTitle.text = getColorSpan(
|
||||
"${data.inviteNick}邀请你达成CP关系,是否同意?",
|
||||
"${data.inviteNick}邀請你達成CP關系,是否同意?",
|
||||
Color.parseColor("#4C5AF1"),
|
||||
0,
|
||||
data.inviteNick.length
|
||||
@@ -128,6 +128,6 @@ class CpInviteReplyDialog(context: Context) :
|
||||
interface ReplyListener {
|
||||
fun onAgree()
|
||||
fun onRefuse()
|
||||
fun onTimeOut()//计时过期
|
||||
fun onTimeOut()//計時過期
|
||||
}
|
||||
}
|
@@ -32,14 +32,14 @@ class FriendFragmentCpDelegate(private val fragment: BaseFragment) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 邀请好友组队
|
||||
* 邀請好友組隊
|
||||
*/
|
||||
fun inviteCp(uid: Long) {
|
||||
cpViewModel.getCpInvitePageData(uid)
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示邀请弹窗 ,填写邀请CP所需的信息
|
||||
* 顯示邀請彈窗 ,填寫邀請CP所需的信息
|
||||
*/
|
||||
|
||||
private fun showInvitePageDialog(info: CpInvitePageEntity) {
|
||||
@@ -51,7 +51,7 @@ class FriendFragmentCpDelegate(private val fragment: BaseFragment) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示发送邀请确认弹窗
|
||||
* 顯示發送邀請確認彈窗
|
||||
*/
|
||||
private fun showSentTipDialog(
|
||||
cpInvitePageEntity: CpInvitePageEntity,
|
||||
@@ -59,8 +59,8 @@ class FriendFragmentCpDelegate(private val fragment: BaseFragment) {
|
||||
) {
|
||||
CpViewHelper.showInviteTipDialog(
|
||||
fragment.requireContext(),
|
||||
"确定送出${cpInvitePageEntity.propsName}礼物与Ta结成CP关系吗?",
|
||||
"(若对方拒接或24小时未同意,钻石将会返还)"
|
||||
"確定送出${cpInvitePageEntity.propsName}禮物與Ta結成CP關系嗎?",
|
||||
"(若對方拒接或24小時未同意,鉆石將會返還)"
|
||||
) {
|
||||
cpViewModel.makeCpInvite(
|
||||
cpInvitePageEntity.acceptUid,
|
||||
@@ -68,7 +68,7 @@ class FriendFragmentCpDelegate(private val fragment: BaseFragment) {
|
||||
cpInvitePageEntity.propsId
|
||||
) {
|
||||
DialogManager(fragment.context).showOkCancelDialog(
|
||||
"钻石余额不足,请前去充值!"
|
||||
"鉆石余額不足,請前去充值!"
|
||||
) { ChargeActivity.start(fragment.requireContext()) }
|
||||
}
|
||||
}
|
||||
|
@@ -100,11 +100,11 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
if (walletNum != null) {
|
||||
long value = (long) (walletNum.getDiamondNum() - walletNum.getDiamondNum() % 10);
|
||||
int result = (int) (value * SharedPreferenceUtils.getExchangeGoldRate());
|
||||
exchangeJewNumber.setHint(String.format("请输入兑换的钻石数量 (最多可兑换%1$s)", result + ""));
|
||||
exchangeJewNumber.setHint(String.format("請輸入兌換的鉆石數量 (最多可兌換%1$s)", result + ""));
|
||||
jewNumber.setText(getString(R.string.jewel_format, FormatUtils.formatBigDecimal(walletNum.getDiamondNum())));
|
||||
goldNumber.setText(getString(R.string.gold_format, FormatUtils.formatBigDecimal(walletNum.getDiamondNum())));
|
||||
exchangeGoldNumber.setText("0钻石");
|
||||
// tvExchangeHammarNum.setText("0锤子");
|
||||
exchangeGoldNumber.setText("0鉆石");
|
||||
// tvExchangeHammarNum.setText("0錘子");
|
||||
changeResultNumStyle();
|
||||
PayModel.get().setCurrentWalletInfo(walletNum);
|
||||
}
|
||||
@@ -131,8 +131,8 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
Long value = Long.parseLong(str);
|
||||
if (isTenMultiple(value)) {
|
||||
int result = (int) (value * SharedPreferenceUtils.getExchangeGoldRate());
|
||||
exchangeGoldNumber.setText(result + "钻石");
|
||||
// tvExchangeHammarNum.setText((result/1000*2) + "锤子");
|
||||
exchangeGoldNumber.setText(result + "鉆石");
|
||||
// tvExchangeHammarNum.setText((result/1000*2) + "錘子");
|
||||
changeResultNumStyle();
|
||||
if (walletInfo != null && value <= walletInfo.getDiamondNum()) {
|
||||
btnEnable = true;
|
||||
@@ -140,15 +140,15 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
tvInputTip.setVisibility(View.GONE);
|
||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.text_tertiary));
|
||||
} else {
|
||||
exchangeGoldNumber.setText("0钻石");
|
||||
// tvExchangeHammarNum.setText("0锤子");
|
||||
exchangeGoldNumber.setText("0鉆石");
|
||||
// tvExchangeHammarNum.setText("0錘子");
|
||||
changeResultNumStyle();
|
||||
tvInputTip.setVisibility(View.VISIBLE);
|
||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.color_FF3852));
|
||||
}
|
||||
} else {
|
||||
exchangeGoldNumber.setText("0钻石");
|
||||
// tvExchangeHammarNum.setText("0锤子");
|
||||
exchangeGoldNumber.setText("0鉆石");
|
||||
// tvExchangeHammarNum.setText("0錘子");
|
||||
changeResultNumStyle();
|
||||
tvInputTip.setVisibility(View.GONE);
|
||||
exchangeJewNumber.setTextColor(getResources().getColor(R.color.text_tertiary));
|
||||
@@ -180,12 +180,12 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
private void changeResultNumStyle() {
|
||||
// if("0锤子".equals(tvExchangeHammarNum.getText().toString())){
|
||||
// if("0錘子".equals(tvExchangeHammarNum.getText().toString())){
|
||||
// tvExchangeHammarNum.setTextColor(getResources().getColor(R.color.text_color_secondary));
|
||||
// } else {
|
||||
// tvExchangeHammarNum.setTextColor(getResources().getColor(R.color.text_color_primary));
|
||||
// }
|
||||
if ("0钻石".equals(exchangeGoldNumber.getText().toString())) {
|
||||
if ("0鉆石".equals(exchangeGoldNumber.getText().toString())) {
|
||||
exchangeGoldNumber.setTextColor(getResources().getColor(R.color.text_color_secondary));
|
||||
} else {
|
||||
exchangeGoldNumber.setTextColor(getResources().getColor(R.color.text_color_primary));
|
||||
@@ -194,7 +194,7 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
|
||||
public void onExchangeGold(WalletInfo walletInfo) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast("兑换成功");
|
||||
toast("兌換成功");
|
||||
exchangeJewNumber.setText("");
|
||||
if (walletInfo == null) {
|
||||
return;
|
||||
@@ -209,7 +209,7 @@ public class ExchangeGoldActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
public void commit(long value, int hammerNum, String pwd) {
|
||||
getDialogManager().showProgressDialog(ExchangeGoldActivity.this, "请稍后...");
|
||||
getDialogManager().showProgressDialog(ExchangeGoldActivity.this, "請稍後...");
|
||||
PayModel.get().exchangeGold((int) value, hammerNum, DESAndBase64(pwd))
|
||||
.subscribe(new BeanObserver<WalletInfo>() {
|
||||
@Override
|
||||
|
@@ -64,7 +64,7 @@ class VipBroadcastDialog : BaseDialog<DialogVipBroadcastBinding>() {
|
||||
if (beanResult.isSuccess) {
|
||||
beanResult.data?.let {
|
||||
binding.clRoot.isVisible = true
|
||||
binding.tvSendLimit.text = "剩余次数${it.remainCount}/${it.totalCount}"
|
||||
binding.tvSendLimit.text = "剩余次數${it.remainCount}/${it.totalCount}"
|
||||
disposable?.dispose()
|
||||
disposable = Observable.interval(0, 1, TimeUnit.SECONDS)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@@ -72,12 +72,12 @@ class VipBroadcastDialog : BaseDialog<DialogVipBroadcastBinding>() {
|
||||
val remainTime =
|
||||
(CurrentTimeUtils.getCurrentTime() - it.lastSendTime) / 1000
|
||||
if (remainTime > 60) {
|
||||
binding.tvSendTip.text = "发布后,1分钟内不可使用小喇叭~"
|
||||
binding.tvSendTip.text = "發布後,1分鐘內不可使用小喇叭~"
|
||||
binding.ivSend.isEnabled = true
|
||||
disposable?.dispose()
|
||||
} else {
|
||||
binding.ivSend.isEnabled = false
|
||||
binding.tvSendTip.text = "${60 - remainTime}后可再次使用喇叭喊话~"
|
||||
binding.tvSendTip.text = "${60 - remainTime}後可再次使用喇叭喊話~"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -66,6 +66,6 @@ class VipUpgradeDialog : BaseDialog<DialogVipUpgradeBinding>() {
|
||||
} catch (e: MalformedURLException) {
|
||||
|
||||
}
|
||||
binding.tvLevelDesc.text = "恭喜你成为「${vipInfo.vipName}」!当前已自动佩戴该等级装扮,是否保留原有装扮?"
|
||||
binding.tvLevelDesc.text = "恭喜你成為「${vipInfo.vipName}」!當前已自動佩戴該等級裝扮,是否保留原有裝扮?"
|
||||
}
|
||||
}
|
@@ -45,7 +45,7 @@ class SuperAdminAddActivity : BaseViewBindingActivity<ActivitySuperAdminAddBindi
|
||||
if (view.id == R.id.tv_set) {
|
||||
adminAdapter.getItem(position)?.let {
|
||||
dialogManager.showOkCancelDialog(
|
||||
"确定要添加用户 ${it.nick} (PekoID:${it.erbanNo})为公会超级管理员吗?",
|
||||
"確定要添加用戶 ${it.nick} (PekoID:${it.erbanNo})為公會超級管理員嗎?",
|
||||
true
|
||||
) {
|
||||
SuperAdminRoomSetActivity.start(this, clanId, it.uid)
|
||||
@@ -58,7 +58,7 @@ class SuperAdminAddActivity : BaseViewBindingActivity<ActivitySuperAdminAddBindi
|
||||
binding.tvSearch.setOnClickListener {
|
||||
val id = binding.searchEdit.text?.toString()?.toLongOrNull()
|
||||
if (id == null) {
|
||||
"请输入Peko号!".toast()
|
||||
"請輸入Peko號!".toast()
|
||||
} else {
|
||||
searchId = id
|
||||
loadData()
|
||||
|
@@ -96,7 +96,7 @@ class SuperAdminManageActivity : BaseViewBindingActivity<ActivitySuperAdminManeg
|
||||
popupWindow.dismiss()
|
||||
}
|
||||
contentView.findViewById<View>(R.id.tv_remove).setOnClickListener {
|
||||
dialogManager.showOkCancelDialog("确定要移除 ${superAdminInfo.nick} 的公会超级管理员身份吗?",true) {
|
||||
dialogManager.showOkCancelDialog("確定要移除 ${superAdminInfo.nick} 的公會超級管理員身份嗎?",true) {
|
||||
popupWindow.dismiss()
|
||||
HallModel.get().removeSuperAdmin(superAdminInfo.uid)
|
||||
.compose(bindToLifecycle())
|
||||
|
@@ -18,7 +18,7 @@ class ManageSuperAdminAdapter :
|
||||
ImageLoadUtils.loadAvatar(item.avatar, helper.getView(R.id.iv_avatar))
|
||||
|
||||
helper.setText(R.id.tv_nickname,item.nick)
|
||||
.setText(R.id.tv_id,"Peko号:${item.erbanNo}")
|
||||
.setText(R.id.tv_id,"Peko號:${item.erbanNo}")
|
||||
.addOnClickListener(R.id.iv_more)
|
||||
|
||||
val rvRoom = helper.getView<RecyclerView>(R.id.rv_room)
|
||||
@@ -32,7 +32,7 @@ class ManageSuperAdminAdapter :
|
||||
)
|
||||
)
|
||||
.setRecyclerView(rvRoom)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(mContext, "暂无管理的房间"))
|
||||
.setEmptyView(EmptyViewHelper.createEmptyView(mContext, "暫無管理的房間"))
|
||||
.setAdapter(ManageRoomAdapter())
|
||||
.build()
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,7 @@ import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
/**
|
||||
* <p> 轰趴房model层:数据获取 </p>
|
||||
* <p> 轟趴房model層:數據獲取 </p>
|
||||
*
|
||||
* @author jiahui
|
||||
* @date 2017/12/8
|
||||
@@ -47,12 +47,12 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 锁坑
|
||||
* 鎖坑
|
||||
*/
|
||||
@Override
|
||||
public Single<String> lockMicroPhone(int micPosition, String roomUid, String ticker) {
|
||||
return mHomePartyService.lockMicroPhone(micPosition, "1", roomUid, ticker,
|
||||
AuthModel.get().getCurrentUid())
|
||||
AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleCommon(() -> ""))
|
||||
.doOnSuccess(s -> {
|
||||
if (SuperAdminUtil.isSuperAdmin()) {
|
||||
@@ -68,19 +68,19 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放该麦坑的锁
|
||||
* 釋放該麥坑的鎖
|
||||
*
|
||||
* @param micPosition
|
||||
*/
|
||||
@Override
|
||||
public Single<String> unLockMicroPhone(int micPosition, String roomUid, String ticker) {
|
||||
return mHomePartyService.lockMicroPhone(micPosition, "0", roomUid, ticker,
|
||||
AuthModel.get().getCurrentUid())
|
||||
AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleCommon(() -> ""));
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新麦序
|
||||
* 更新麥序
|
||||
*/
|
||||
@Override
|
||||
public void updateMicQueue(final String roomId, final String key, String value) {
|
||||
@@ -89,14 +89,14 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
.setCallback(new RequestCallbackWrapper<Void>() {
|
||||
@Override
|
||||
public void onResult(int i, Void aVoid, Throwable throwable) {
|
||||
Logger.i("%1$s房间更新麦序%2$s成功", roomId, key);
|
||||
Logger.i("%1$s房間更新麥序%2$s成功", roomId, key);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取固定成员(创建者,管理员,普通用户,受限用户)
|
||||
* 獲取固定成員(創建者,管理員,普通用戶,受限用戶)
|
||||
*
|
||||
* @param roomId
|
||||
* @param time
|
||||
@@ -140,7 +140,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 开麦
|
||||
* 開麥
|
||||
*
|
||||
* @param micPosition
|
||||
* @param roomUid
|
||||
@@ -151,7 +151,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 闭麦
|
||||
* 閉麥
|
||||
*
|
||||
* @param micPosition
|
||||
* @param roomUid
|
||||
@@ -164,7 +164,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
String resource = (String) NobleUtil.getResource(NobleResourceType.KEY_LEVEL, roomQueueInfo.mChatRoomMember);
|
||||
if (!TextUtils.isEmpty(resource)) {
|
||||
if (!NobleUtil.canKickMicroOrNot(Integer.valueOf(resource))) {
|
||||
String tips = "不能禁麦" + NobleUtil.getNobleName(Integer.valueOf(resource)) + "陛下哦";
|
||||
String tips = "不能禁麥" + NobleUtil.getNobleName(Integer.valueOf(resource)) + "陛下哦";
|
||||
SingleToastUtil.showToastShort(tips);
|
||||
return Single.error(new Throwable(tips));
|
||||
}
|
||||
@@ -174,20 +174,20 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 开闭麦接口
|
||||
* 開閉麥接口
|
||||
*
|
||||
* @param micPosition
|
||||
* @param state 1:闭麦,0:开麦
|
||||
* @param state 1:閉麥,0:開麥
|
||||
* @param roomUid
|
||||
* @param ticket
|
||||
*/
|
||||
@Override
|
||||
public Single<String> openOrCloseMicroPhone(int micPosition, int state, long roomUid, String ticket) {
|
||||
return mHomePartyService.openMicroPhone(micPosition, state, roomUid, ticket,
|
||||
AuthModel.get().getCurrentUid())
|
||||
AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleCommon(() -> ""))
|
||||
.doOnSuccess(s -> {
|
||||
//如果是闭麦,并且是超管操作,需要发公屏
|
||||
//如果是閉麥,並且是超管操作,需要發公屏
|
||||
if (state == 1 && SuperAdminUtil.isSuperAdmin()) {
|
||||
IMNetEaseManager.get()
|
||||
.sendChatRoomMessage(
|
||||
@@ -231,16 +231,16 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
}
|
||||
|
||||
/**
|
||||
* 轰趴房间服务器相关接口
|
||||
* 轟趴房間服務器相關接口
|
||||
*/
|
||||
private interface HomePartyService {
|
||||
|
||||
/**
|
||||
* 锁坑,开坑操作
|
||||
* 鎖坑,開坑操作
|
||||
*
|
||||
* @param micPosition
|
||||
* @param state 1:锁,0:不锁
|
||||
* @param roomUid 房主或管理员id
|
||||
* @param state 1:鎖,0:不鎖
|
||||
* @param roomUid 房主或管理員id
|
||||
* @param ticket
|
||||
* @return
|
||||
*/
|
||||
@@ -254,10 +254,10 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
|
||||
|
||||
/**
|
||||
* 锁麦,开麦操作
|
||||
* 鎖麥,開麥操作
|
||||
*
|
||||
* @param micPosition
|
||||
* @param state 1:闭麦,0:开麦
|
||||
* @param state 1:閉麥,0:開麥
|
||||
* @param roomUid
|
||||
* @param ticket
|
||||
* @return
|
||||
@@ -265,15 +265,15 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
@FormUrlEncoded
|
||||
@POST("room/mic/lockmic")
|
||||
Single<ServiceResult<String>> openMicroPhone(@Field("position") int micPosition,
|
||||
@Field("state") int state,
|
||||
@Field("roomUid") long roomUid,
|
||||
@Field("ticket") String ticket,
|
||||
@Field("uid") long uid);
|
||||
@Field("state") int state,
|
||||
@Field("roomUid") long roomUid,
|
||||
@Field("ticket") String ticket,
|
||||
@Field("uid") long uid);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 开启相亲模式
|
||||
* 開啟相親模式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -282,7 +282,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
Single<ServiceResult<String>> datingOpen(@Field("roomUid") long roomUid);
|
||||
|
||||
/**
|
||||
* 关闭相亲模式
|
||||
* 關閉相親模式
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -291,7 +291,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
Single<ServiceResult<String>> datingClose(@Field("roomUid") long roomUid);
|
||||
|
||||
/**
|
||||
* 相亲开始下一步
|
||||
* 相親開始下一步
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@@ -300,7 +300,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel {
|
||||
Single<ServiceResult<String>> datingNext(@Field("roomUserId") long roomUserId);
|
||||
|
||||
/**
|
||||
* 相亲选人
|
||||
* 相親選人
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
|
Reference in New Issue
Block a user