diff --git a/app/src/main/java/com/yizhuan/erban/avroom/adapter/DatingMicroViewAdapter.kt b/app/src/main/java/com/yizhuan/erban/avroom/adapter/DatingMicroViewAdapter.kt index 15cc6744d..09ca665b3 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/adapter/DatingMicroViewAdapter.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/adapter/DatingMicroViewAdapter.kt @@ -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 "女神"}位" } } diff --git a/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPKCreateActivity.kt b/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPKCreateActivity.kt index 13aa53c87..e2b450e51 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPKCreateActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPKCreateActivity.kt @@ -129,7 +129,7 @@ class RoomPKCreateActivity : BaseViewBindingActivity(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) } diff --git a/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPkReceivedDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPkReceivedDialog.kt index 54c0e82aa..2a707068f 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPkReceivedDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/anotherroompk/RoomPkReceivedDialog.kt @@ -37,7 +37,7 @@ class RoomPkReceivedDialog : BaseDialog() { @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() { RoomPKModel.acceptRoomPK(accept, AvRoomDataManager.get().roomUid, pkBean.roundId) .compose(bindToLifecycle()) .subscribe({ - //"接受PK邀请成功".toast() + //"接受PK邀請成功".toast() dismissAllowingStateLoss() }, { it.message.toast() diff --git a/app/src/main/java/com/yizhuan/erban/avroom/fragment/BaseRoomFragment.kt b/app/src/main/java/com/yizhuan/erban/avroom/fragment/BaseRoomFragment.kt index c8e435297..8c3276cf3 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/fragment/BaseRoomFragment.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/fragment/BaseRoomFragment.kt @@ -121,8 +121,8 @@ import org.greenrobot.eventbus.ThreadMode /** - * 房间基类,这里实现了一些房间基础功能 - * 如发消息、公屏、底部按钮等等... + * 房間基類,這裏實現了一些房間基礎功能 + * 如發消息、公屏、底部按鈕等等... * * @author chenran * @date 2017/7/26 @@ -148,24 +148,24 @@ open class BaseRoomFragment?> : 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?> : @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?> : mvpPresenter?.chatRoomReConnect(IMNetEaseManager.get().mCacheRoomQueueInfo) } - // 接收公屏消息点击 可点击房间编辑页查看 事件 + // 接收公屏消息點擊 可點擊房間編輯頁查看 事件 RxBus.get().toFlowable(OpenRoomIntroEvent::class.java) .compose(bindToLifecycle()) .subscribe { showRoomIntroduction(false) } @@ -260,7 +260,7 @@ open class BaseRoomFragment?> : .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?> : 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?> : } 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?> : } /** - * 开启或关闭公屏 + * 開啟或關閉公屏 */ private fun updateScreen() { if (AvRoomDataManager.get().mCurrentRoomInfo == null || @@ -388,14 +388,14 @@ open class BaseRoomFragment?> : } /** - * 嗨聊房切换重置公屏消息(绿色公告) + * 嗨聊房切換重置公屏消息(綠色公告) */ 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?> : 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?> : ) { 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?> : 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?> : 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?> : @CallSuper open fun updateView() { - // 更新底栏 + // 更新底欄 showBottomViewForDifRole() } /** - * 根据角色显示不同的状态 + * 根據角色顯示不同的狀態 */ @CallSuper open fun showBottomViewForDifRole() { @@ -507,7 +507,7 @@ open class BaseRoomFragment?> : bottomView.showHomePartyDownMicBottom() } bottomView.showInputOrIcon(isOnMic) - // 更新听筒消息 + // 更新聽筒消息 bottomView.setRemoteMuteOpen(!AudioEngineManager.get().isRemoteMute) if (isOnMic) { if (musicPlayerView == null) { @@ -520,11 +520,11 @@ open class BaseRoomFragment?> : } /** - * 检查是否关注房主,然后弹出 + * 檢查是否關註房主,然後彈出 */ private fun checkFollowOwner() { val currentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo ?: return - //如果当前账号是房主也过滤 + //如果當前賬號是房主也過濾 if (AvRoomDataManager.get().isRoomOwner) { return } @@ -545,7 +545,7 @@ open class BaseRoomFragment?> : && myUid.toString() == roomQueueInfo.mChatRoomMember.account && roomQueueInfo.mRoomMicInfo?.isMicMute == true ) { - //先判断坑位是否被闭麦了 + //先判斷坑位是否被閉麥了 bottomView.setMicBtnEnable(false) bottomView.setMicBtnOpen(false) } else { @@ -553,7 +553,7 @@ open class BaseRoomFragment?> : if (AudioEngineManager.get().isMute) { bottomView.setMicBtnOpen(false) } else { - //获取当前是否有麦克风权限 + //獲取當前是否有麥克風權限 val isPermission = isHavingMicPermissions if (!isPermission) { AudioEngineManager.get().isMute = true @@ -592,7 +592,7 @@ open class BaseRoomFragment?> : if (chatRoomStatusChangeData != null && chatRoomStatusChangeData.status == StatusCode.LOGINED ) { - // 重新调服务器的userroom/inV2,保持座位上有贵族 + // 重新調服務器的userroom/inV2,保持座位上有貴族 mvpPresenter?.userRoomIn() } } @@ -663,12 +663,12 @@ open class BaseRoomFragment?> : 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?> : .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?> : 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?> : showBottomViewForDifRole() updateMicBtn() microView.adapter.notifyDataSetChanged() - //下麦时更新最高最低头饰 + //下麥時更新最高最低頭飾 GiftValueMrg.get().updateRoomGiftValue(false) } @@ -759,7 +759,7 @@ open class BaseRoomFragment?> : ) { val buttonItems: MutableList = 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?> : } }) 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?> : } } if (!AvRoomDataManager.get().isOpenPKMode) { - //超管只有锁麦操作 + //超管只有鎖麥操作 if (SuperAdminUtil.isSuperAdmin()) { if (!roomMicInfo.isMicLock && !isQueue) { buttonItems.add(buttonItem3) @@ -832,7 +832,7 @@ open class BaseRoomFragment?> : } } } - //超管只有闭麦操作 + //超管只有閉麥操作 if (SuperAdminUtil.isSuperAdmin()) { if (!roomMicInfo.isMicMute) { buttonItems.add(buttonItem2) @@ -906,9 +906,9 @@ open class BaseRoomFragment?> : 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?> : 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?> : } } if (AvRoomDataManager.get().isRoomOwner(account)) { - //当前是房主 + //當前是房主 AvRoomDataManager.get().mRoomCreateMember = null } } @@ -978,7 +978,7 @@ open class BaseRoomFragment?> : } /** - * 显示资料卡片 + * 顯示資料卡片 */ private fun showUserCardDialog(account: String) { UserInfoDialog.showNewUserInfoDialog( @@ -994,7 +994,7 @@ open class BaseRoomFragment?> : @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?> : if (result) { mvpPresenter?.upMicroPhone(micPosition, currentUid, b) } else { - toast("请给予麦克风权限后再试!") + toast("請給予麥克風權限後再試!") } - }, { throwable: Throwable? -> toast("发生一些异常,请稍后重试!") }) + }, { throwable: Throwable? -> toast("發生一些異常,請稍後重試!") }) } /** - * 是否有麦克风权限 + * 是否有麥克風權限 * * @return */ @@ -1091,15 +1091,15 @@ open class BaseRoomFragment?> : 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(R.id.iv_close_speedy_message).setOnClickListener { @@ -1110,12 +1110,12 @@ open class BaseRoomFragment?> : 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?> : 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?> : } 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?> : } /** - * 用户弹窗点击@Ta + * 用戶彈窗點擊@Ta * * @param event */ @@ -1185,7 +1185,7 @@ open class BaseRoomFragment?> : } /** - * 底部按钮点击处理 + * 底部按鈕點擊處理 */ open inner class BaseRoomBottomViewWrapper : BottomViewListenerWrapper() { @SuppressLint("CheckResult") @@ -1193,7 +1193,7 @@ open class BaseRoomFragment?> : 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?> : AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER) updateMicBtn() } else { - toast("开启权限后才能开麦") + toast("開啟權限後才能開麥") } } return @@ -1214,7 +1214,7 @@ open class BaseRoomFragment?> : 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?> : 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?> : dynamicFaceDialog?.show() } } else { - toast("上麦才能发表情哦!") + toast("上麥才能發表情哦!") } } @@ -1250,7 +1250,7 @@ open class BaseRoomFragment?> : 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?> : 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?> : 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?> : override fun onRoomMessageClick() { StatisticManager.Instance() - .onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_CLICK, "语音房_消息") + .onEvent(StatisticsProtocol.EVENT_ROOM_MESSAGE_CLICK, "語音房_消息") RoomMsgActivity.start(mContext) } } diff --git a/app/src/main/java/com/yizhuan/erban/avroom/fragment/SingleRoomFragment.kt b/app/src/main/java/com/yizhuan/erban/avroom/fragment/SingleRoomFragment.kt index cc2fb72da..d777e7b74 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/fragment/SingleRoomFragment.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/fragment/SingleRoomFragment.kt @@ -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 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) } \ No newline at end of file diff --git a/app/src/main/java/com/yizhuan/erban/avroom/newuserchargegift/NewUserChargeGiftDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/newuserchargegift/NewUserChargeGiftDialog.kt index 519039bb6..afddd7b12 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/newuserchargegift/NewUserChargeGiftDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/newuserchargegift/NewUserChargeGiftDialog.kt @@ -57,7 +57,7 @@ class NewUserChargeGiftDialog : BaseViewBindingActivity extends BaseMvpPresenter { /** - * 显示关注房主的时间 + * 顯示關註房主的時間 */ public static final int SHOW_FOLLOW_TIME = 3 * 60 * 1000; public final Gson gson = new Gson(); @@ -75,7 +75,7 @@ public class BaseRoomPresenter 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 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 extends BaseMvpPresenter } } - //发送云信消息,请求上麦 + //發送雲信消息,請求上麥 private void requestUpMic(UserInfo userInfo) { RequestUpmicAttachment attachment = new RequestUpmicAttachment(0); attachment.setUserInfo(userInfo); @@ -182,11 +182,11 @@ public class BaseRoomPresenter 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 extends BaseMvpPresenter } /** - * 坑位释放锁 + * 坑位釋放鎖 */ public void unLockMicroPhone(int micPosition) { if (!mIsUnLockMicPosResultSuccess) { @@ -211,13 +211,13 @@ public class BaseRoomPresenter extends BaseMvpPresenter .subscribe(new Consumer() { @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() { @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 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 extends BaseMvpPresenter mHomePartyMode.downMicroPhone(micPosition, new CallBack() { @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 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 extends BaseMvpPresenter isInviteUpMic, new CallBack() { @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 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 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 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 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 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 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() { @Override public void accept(Throwable throwable) throws Exception { throwable.printStackTrace(); - Logger.i("断网重连获取队列信息失败...."); + Logger.i("斷網重連獲取隊列信息失敗...."); } }); } @@ -454,12 +454,12 @@ public class BaseRoomPresenter 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 extends BaseMvpPresenter /** - * 检查是否关注了这个用户 + * 檢查是否關註了這個用戶 * * @param uid */ @@ -485,7 +485,7 @@ public class BaseRoomPresenter 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 extends BaseMvpPresenter } /** - * 关注房主 + * 關註房主 * * @param position * @param ownerUid @@ -539,7 +539,7 @@ public class BaseRoomPresenter extends BaseMvpPresenter } /*** - * 发送房间消息 + * 發送房間消息 * @param message */ @SuppressLint("CheckResult") @@ -555,12 +555,12 @@ public class BaseRoomPresenter 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()); } } }); diff --git a/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageOpenDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageOpenDialog.kt index 7e19de6f9..bb7cdc094 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageOpenDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageOpenDialog.kt @@ -78,12 +78,12 @@ class RedPackageOpenDialog : BaseDialog() { @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() { 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() { 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() { 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) } diff --git a/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageSendDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageSendDialog.kt index f3429b2c5..1d9da3ba3 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageSendDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/redpackage/RedPackageSendDialog.kt @@ -69,7 +69,7 @@ class RedPackageSendDialog : BaseDialog(), GridPass val initInfo = InitialModel.get().cacheInitInfo ?: InitInfo() /** - * 厅内 + * 廳內 */ fun changeToNotAll() { isAll = false @@ -77,7 +77,7 @@ class RedPackageSendDialog : BaseDialog(), 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(), 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(), 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(), 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(), 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(), 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() { diff --git a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPKCreateActivity.kt b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPKCreateActivity.kt index ca03d2cb6..205f94336 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPKCreateActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPKCreateActivity.kt @@ -129,7 +129,7 @@ class SingleRoomPKCreateActivity : BaseViewBindingActivity(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) } } diff --git a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkFinishDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkFinishDialog.kt index 4d51dbada..3dbe6ba94 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkFinishDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkFinishDialog.kt @@ -71,7 +71,7 @@ class SingleRoomPkFinishDialog : BaseDialog() { .observeOn(AndroidSchedulers.mainThread()) .doOnComplete { dismissAllowingStateLoss() } .subscribe { - binding.tvClose.text = "关闭(${5 - it})" + binding.tvClose.text = "關閉(${5 - it})" } when (roomPkBean.winUid) { diff --git a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkReceivedDialog.kt b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkReceivedDialog.kt index 2284a4732..37374e419 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkReceivedDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/singleroompk/SingleRoomPkReceivedDialog.kt @@ -37,7 +37,7 @@ class SingleRoomPkReceivedDialog : BaseDialog @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 SingleRoomPKModel.acceptRoomPK(accept, AvRoomDataManager.get().roomUid, pkBean.roundId) .compose(bindToLifecycle()) .subscribe({ - //"接受PK邀请成功".toast() + //"接受PK邀請成功".toast() dismissAllowingStateLoss() }, { it.message.toast() diff --git a/app/src/main/java/com/yizhuan/erban/avroom/widget/MessageView.java b/app/src/main/java/com/yizhuan/erban/avroom/widget/MessageView.java index 6524979cd..2f12b855b 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/widget/MessageView.java +++ b/app/src/main/java/com/yizhuan/erban/avroom/widget/MessageView.java @@ -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 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 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 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 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> 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 出 運氣表情 *

* {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() { @@ -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; diff --git a/app/src/main/java/com/yizhuan/erban/avroom/widget/RoomEffectView.kt b/app/src/main/java/com/yizhuan/erban/avroom/widget/RoomEffectView.kt index 4ff0f6e51..fed514082 100644 --- a/app/src/main/java/com/yizhuan/erban/avroom/widget/RoomEffectView.kt +++ b/app/src/main/java/com/yizhuan/erban/avroom/widget/RoomEffectView.kt @@ -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 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(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() diff --git a/app/src/main/java/com/yizhuan/erban/common/widget/dialog/DialogManager.java b/app/src/main/java/com/yizhuan/erban/common/widget/dialog/DialogManager.java index 260c7de03..686f90691 100644 --- a/app/src/main/java/com/yizhuan/erban/common/widget/dialog/DialogManager.java +++ b/app/src/main/java/com/yizhuan/erban/common/widget/dialog/DialogManager.java @@ -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(); diff --git a/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinActivity.kt b/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinActivity.kt index 0babf0ad7..18f011a52 100644 --- a/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinActivity.kt @@ -88,14 +88,14 @@ class FansTeamJoinActivity : BaseViewBindingActivity t.message.toast() }) } ?: run { - "数据初始化中,请稍后~".toast() + "數據初始化中,請稍後~".toast() } } } diff --git a/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinedActivity.kt b/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinedActivity.kt index 32131b143..b97e72ce4 100644 --- a/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinedActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/fansteam/FansTeamJoinedActivity.kt @@ -76,7 +76,7 @@ class FansTeamJoinedActivity : BaseViewBindingActivity(R.id.tv_exit).setOnClickListener { - dialogManager.showOkCancelDialog("退出后粉丝团后24小时内不能再次加入,确定退出吗?", true) { + dialogManager.showOkCancelDialog("退出後粉絲團後24小時內不能再次加入,確定退出嗎?", true) { popupWindow.dismiss() fansTeamViewModel.exitFansTeam() } diff --git a/app/src/main/java/com/yizhuan/erban/home/widget/AnchorCardView.kt b/app/src/main/java/com/yizhuan/erban/home/widget/AnchorCardView.kt index 5dbd51dab..2f105368f 100644 --- a/app/src/main/java/com/yizhuan/erban/home/widget/AnchorCardView.kt +++ b/app/src/main/java/com/yizhuan/erban/home/widget/AnchorCardView.kt @@ -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() { diff --git a/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldSuccessActivity.kt b/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldSuccessActivity.kt index 857a5a4b0..3ac650b21 100644 --- a/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldSuccessActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldSuccessActivity.kt @@ -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() } } diff --git a/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldToUserActivity.kt b/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldToUserActivity.kt index 584ab7f9d..086d707f6 100644 --- a/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldToUserActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/pay/activity/GiveGoldToUserActivity.kt @@ -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) + } } } } diff --git a/app/src/main/java/com/yizhuan/erban/relation/cp/CpViewHelper.kt b/app/src/main/java/com/yizhuan/erban/relation/cp/CpViewHelper.kt index 3fb08c054..71720e302 100644 --- a/app/src/main/java/com/yizhuan/erban/relation/cp/CpViewHelper.kt +++ b/app/src/main/java/com/yizhuan/erban/relation/cp/CpViewHelper.kt @@ -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) } } \ No newline at end of file diff --git a/app/src/main/java/com/yizhuan/erban/relation/cp/activity/CpInviteRecordActivity.kt b/app/src/main/java/com/yizhuan/erban/relation/cp/activity/CpInviteRecordActivity.kt index 4e4e55918..6f777c5f8 100644 --- a/app/src/main/java/com/yizhuan/erban/relation/cp/activity/CpInviteRecordActivity.kt +++ b/app/src/main/java/com/yizhuan/erban/relation/cp/activity/CpInviteRecordActivity.kt @@ -30,7 +30,7 @@ import org.greenrobot.eventbus.ThreadMode class CpInviteRecordActivity : BaseBindingActivity() { 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() { @Override diff --git a/app/src/main/java/com/yizhuan/erban/vip/VipBroadcastDialog.kt b/app/src/main/java/com/yizhuan/erban/vip/VipBroadcastDialog.kt index cd345f779..472872fef 100644 --- a/app/src/main/java/com/yizhuan/erban/vip/VipBroadcastDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/vip/VipBroadcastDialog.kt @@ -64,7 +64,7 @@ class VipBroadcastDialog : BaseDialog() { 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() { 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}後可再次使用喇叭喊話~" } } } diff --git a/app/src/main/java/com/yizhuan/erban/vip/VipUpgradeDialog.kt b/app/src/main/java/com/yizhuan/erban/vip/VipUpgradeDialog.kt index 25f0e7e4b..c0b3b2919 100644 --- a/app/src/main/java/com/yizhuan/erban/vip/VipUpgradeDialog.kt +++ b/app/src/main/java/com/yizhuan/erban/vip/VipUpgradeDialog.kt @@ -66,6 +66,6 @@ class VipUpgradeDialog : BaseDialog() { } catch (e: MalformedURLException) { } - binding.tvLevelDesc.text = "恭喜你成为「${vipInfo.vipName}」!当前已自动佩戴该等级装扮,是否保留原有装扮?" + binding.tvLevelDesc.text = "恭喜你成為「${vipInfo.vipName}」!當前已自動佩戴該等級裝扮,是否保留原有裝扮?" } } \ No newline at end of file diff --git a/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/activity/SuperAdminAddActivity.kt b/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/activity/SuperAdminAddActivity.kt index 9fdb6b45c..30c2151a5 100644 --- a/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/activity/SuperAdminAddActivity.kt +++ b/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/activity/SuperAdminAddActivity.kt @@ -45,7 +45,7 @@ class SuperAdminAddActivity : BaseViewBindingActivity(R.id.tv_remove).setOnClickListener { - dialogManager.showOkCancelDialog("确定要移除 ${superAdminInfo.nick} 的公会超级管理员身份吗?",true) { + dialogManager.showOkCancelDialog("確定要移除 ${superAdminInfo.nick} 的公會超級管理員身份嗎?",true) { popupWindow.dismiss() HallModel.get().removeSuperAdmin(superAdminInfo.uid) .compose(bindToLifecycle()) diff --git a/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/adapter/ManageSuperAdminAdapter.kt b/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/adapter/ManageSuperAdminAdapter.kt index c46d65c93..b125de5eb 100644 --- a/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/adapter/ManageSuperAdminAdapter.kt +++ b/app/src/module_labour_union/java/com/yizhuan/erban/module_hall/hall/adapter/ManageSuperAdminAdapter.kt @@ -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(R.id.rv_room) @@ -32,7 +32,7 @@ class ManageSuperAdminAdapter : ) ) .setRecyclerView(rvRoom) - .setEmptyView(EmptyViewHelper.createEmptyView(mContext, "暂无管理的房间")) + .setEmptyView(EmptyViewHelper.createEmptyView(mContext, "暫無管理的房間")) .setAdapter(ManageRoomAdapter()) .build() } diff --git a/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java b/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java index a8c22004d..e0f733aa2 100644 --- a/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java +++ b/core/src/diff_src_erban/java/com/yizhuan/xchat_android_core/manager/IMNetEaseManager.java @@ -208,7 +208,7 @@ import io.reactivex.schedulers.Schedulers; import io.reactivex.subjects.PublishSubject; /** - *

云信聊天室管理,一个全局的Model

+ *

雲信聊天室管理,一個全局的Model

* * @author jiahui * @date 2017/12/12 @@ -250,7 +250,7 @@ public final class IMNetEaseManager { } /** - * 注册消息过滤器 + * 註冊消息過濾器 */ private void registerMessageFilter() { NIMClient.getService(MsgService.class) @@ -265,7 +265,7 @@ public final class IMNetEaseManager { LuckyMoneyTipsAttachment luckyMoneyAttachment = (LuckyMoneyTipsAttachment) message.getAttachment(); LuckyMoneyInfo luckyMoneyInfo = luckyMoneyAttachment.getLuckyMoneyInfo(); String uid = String.valueOf(AuthModel.get().getCurrentUid()); - // 你领取了某人的红包 || 某人领取了你的红包 + // 你領取了某人的紅包 || 某人領取了你的紅包 if (!(Objects.equals(uid, String.valueOf(luckyMoneyInfo.getReceiveUid())) || Objects.equals(uid, String.valueOf(luckyMoneyInfo.getSenderUid())))) { Log.e(TAG, "registerMessageFilter: CUSTOM_MSG_SUB_TYPE_RECEIVE_LUCKY_MONEY"); @@ -275,7 +275,7 @@ public final class IMNetEaseManager { } break; - //邀请粉丝 + //邀請粉絲 case CustomAttachment.CUSTOM_MSG_PUSH_NOTIFIFICATION: switch (customAttachment.getSecond()) { case CustomAttachment.CUSTOM_MSG_SUB_PUSH_NOTIFICATION_IN_ROOM: @@ -297,7 +297,7 @@ public final class IMNetEaseManager { } /** - * 接收来后台的开通贵族的小秘书通知,做出更新房间贵族和等级,座驾等操作 + * 接收來後臺的開通貴族的小秘書通知,做出更新房間貴族和等級,座駕等操作 */ private void registerServerMessage() { MsgServiceObserve service = NIMClient.getService(MsgServiceObserve.class); @@ -314,7 +314,7 @@ public final class IMNetEaseManager { RoomInfo mCurrentRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo; if (mCurrentRoomInfo == null || mCurrentRoomInfo.getRoomId() == 0) return; - // 如果是开通或者过期都需要更新房间里面的ext字段 + // 如果是開通或者過期都需要更新房間裏面的ext字段 updateMyRoomRole(); } } @@ -346,7 +346,7 @@ public final class IMNetEaseManager { EventBus.getDefault().post(miniWorldJoinVerifiedEvent); } } else if (attachment instanceof AssistantAttachment) { - //被赠送 头饰,座驾 + //被贈送 頭飾,座駕 AssistantAttachment monsterAwardAttachment = (AssistantAttachment) attachment; if (monsterAwardAttachment.routerType == RouterType.CAR || monsterAwardAttachment.routerType == RouterType.DECORATION) { @@ -370,7 +370,7 @@ public final class IMNetEaseManager { } /** - * 更新本人在聊天室内的信息 + * 更新本人在聊天室內的信息 */ public void updateMyRoomRole() { final long currentUid = AuthModel.get().getCurrentUid(); @@ -400,7 +400,7 @@ public final class IMNetEaseManager { if (carInfo != null) { valueMap = carInfo.toMap(valueMap, carInfo); } - //多个判断,头饰不过期才传pic + //多個判斷,頭飾不過期才傳pic if (headWearInfo != null && headWearInfo.getStatus() == HeadWearInfo.STATUS_IN_USED) { valueMap = headWearInfo.toMap(valueMap); } @@ -424,10 +424,10 @@ public final class IMNetEaseManager { private void registerKickoutEvent() { Observer kickOutObserver = (Observer) chatRoomKickOutEvent -> { - // 收到不是自己房间的踢人消息直接return + // 收到不是自己房間的踢人消息直接return if (filterAnotherChatRoom(chatRoomKickOutEvent)) return; LogUtil.e(TAG, ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_04)); - // 提示被踢出的原因(聊天室已解散、被管理员踢出、被其他端踢出等 + // 提示被踢出的原因(聊天室已解散、被管理員踢出、被其他端踢出等 Map extension = chatRoomKickOutEvent.getExtension(); String account = null; String userIdKick = null; @@ -437,15 +437,15 @@ public final class IMNetEaseManager { userIdKick = (String) extension.get(StatLogKey.USER_ID_KICK); } if (AvRoomDataManager.get().mCurrentRoomInfo != null) { - //通知服务端该用户要退出房间 + //通知服務端該用戶要退出房間 model.quitUserRoomV2().subscribe(); - //取消报名 + //取消報名 if (AvRoomDataManager.get().isQueuingMicro() && AvRoomDataManager.get().myIsInQueue) { MicQueueModel.get().cancelApplyForQueuing().subscribe(); } } noticeKickOutChatMember(chatRoomKickOutEvent, account); - // 清空缓存数据 + // 清空緩存數據 AvRoomDataManager.get().release(); }; NIMChatRoomSDK.getChatRoomServiceObserve().observeKickOutEvent(kickOutObserver, true); @@ -484,9 +484,9 @@ public final class IMNetEaseManager { MLog.info(TAG, ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_06)); } else if (chatRoomStatusChangeData.status == StatusCode.UNLOGIN) { int errorCode = NIMChatRoomSDK.getChatRoomService().getEnterErrorCode(chatRoomStatusChangeData.roomId); - // 如果遇到错误码13001,13002,13003,403,404,414,表示无法进入聊天室,此时应该调用离开聊天室接口。 + // 如果遇到錯誤碼13001,13002,13003,403,404,414,表示無法進入聊天室,此時應該調用離開聊天室接口。 if (errorCode == ResponseCode.RES_CHATROOM_STATUS_EXCEPTION) { - // 聊天室连接状态异常 + // 聊天室連接狀態異常 MLog.error(TAG, ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_07)); } MLog.error(TAG, ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_08)); @@ -494,7 +494,7 @@ public final class IMNetEaseManager { RoomQueueInfo roomQueueInfo = AvRoomDataManager.get().getRoomQueueMemberInfoByAccount(String.valueOf(currentUid)); if (roomQueueInfo == null) return; mCacheRoomQueueInfo = new RoomQueueInfo(roomQueueInfo.mRoomMicInfo, roomQueueInfo.mChatRoomMember); - //把礼物值也保留起来 + //把禮物值也保留起來 mCacheRoomQueueInfo.giftValueData = roomQueueInfo.giftValueData; } } else if (chatRoomStatusChangeData.status == StatusCode.LOGINING) { @@ -533,7 +533,7 @@ public final class IMNetEaseManager { } parans.put("is_on_mic", "2"); mCacheRoomQueueInfo = new RoomQueueInfo(roomQueueInfo.mRoomMicInfo, roomQueueInfo.mChatRoomMember); - //礼物值 + //禮物值 mCacheRoomQueueInfo.giftValueData = roomQueueInfo.giftValueData; } else { parans.put("is_on_mic", "0"); @@ -576,7 +576,7 @@ public final class IMNetEaseManager { String roomId = String.valueOf(currentRoomInfo.getRoomId()); System.out.println("roomId: " + roomId + ", sessionId: " + sessionId); boolean notTheSameRoom = !Objects.equals(roomId, sessionId); - // 退出异常的房间 + // 退出異常的房間 if (notTheSameRoom) NIMChatRoomSDK.getChatRoomService().exitChatRoom(sessionId); return !(TextUtils.isEmpty(sessionId) || TextUtils.isEmpty(roomId)) && notTheSameRoom; @@ -587,7 +587,7 @@ public final class IMNetEaseManager { boolean face = false; boolean gift = false; for (ChatRoomMessage msg : chatRoomMessages) { - // 过滤其他房间的信息 + // 過濾其他房間的信息 if (filterAnotherChatRoom(msg)) continue; if (msg.getMsgType() == MsgTypeEnum.notification) { NotificationAttachment attachment = (NotificationAttachment) msg.getAttachment(); @@ -597,11 +597,11 @@ public final class IMNetEaseManager { } else if (attachment.getType() == NotificationType.ChatRoomQueueBatchChange) { chatRoomQueueBatchChange(msg); } else if (attachment.getType() == NotificationType.ChatRoomInfoUpdated) { - //房间信息更新 + //房間信息更新 chatRoomInfoUpdate(msg); } else if (attachment.getType() == NotificationType.ChatRoomMemberIn) { sendDescMessage(msg); - // 如果能隐身进入不显示公屏通知,否则显示公屏通知 + // 如果能隱身進入不顯示公屏通知,否則顯示公屏通知 // TODO 超管-公屏不展示 // addMessagesImmediately(!needToHideEnterMessage(msg) ? msg : null); List targets = ((ChatRoomNotificationAttachment) attachment).getTargets(); @@ -609,7 +609,7 @@ public final class IMNetEaseManager { return; } chatRoomMemberIn(targets.get(0), msg); - //如果是自己进房,立即刷新一次超管缓存 + //如果是自己進房,立即刷新一次超管緩存 if (UserModel.get().isMyseft(targets.get(0))) { SuperAdminDataMrg.get().firstInitList(); } else { @@ -624,7 +624,7 @@ public final class IMNetEaseManager { SuperAdminDataMrg.get().handleMemberOutRoom(targets.get(0)); } else if (attachment.getType() == NotificationType.ChatRoomManagerAdd) { - //管理员id集合列表 + //管理員id集合列表 List targets = ((ChatRoomNotificationAttachment) attachment).getTargets(); addManagerMember(targets.get(0)); } else if (attachment.getType() == NotificationType.ChatRoomManagerRemove) { @@ -638,20 +638,20 @@ public final class IMNetEaseManager { List targets = ((ChatRoomNotificationAttachment) attachment).getTargets(); AvRoomDataManager.get().removeBlackMember(targets.get(0)); } else if (attachment.getType() == NotificationType.ChatRoomMyRoomRoleUpdated) { - // 房间内的某人的贵族信息更新了 + // 房間內的某人的貴族信息更新了 Map extension = null; ChatRoomMessageExtension chatRoomMessageExtension = msg.getChatRoomMessageExtension(); - // 如果有发送过来的,获取对应的ext字段 + // 如果有發送過來的,獲取對應的ext字段 if (attachment instanceof ChatRoomQueueChangeAttachment) { extension = ((ChatRoomQueueChangeAttachment) attachment).getExtension(); } - // 没有直接发送过来,可以获取发送者的ext字段 + // 沒有直接發送過來,可以獲取發送者的ext字段 if (extension == null && chatRoomMessageExtension != null) { extension = chatRoomMessageExtension.getSenderExtension(); } - // 如果有对应的ext字段 + // 如果有對應的ext字段 if (extension != null) { - // 更新房间内队列的chatRoomMember + // 更新房間內隊列的chatRoomMember AvRoomDataManager.get().updateQueueChatRoomMemberExtension(msg.getFromAccount(), extension); noticeQueueMemberInfoUpdate(); } @@ -662,7 +662,7 @@ public final class IMNetEaseManager { MsgAttachment attachment = msg.getAttachment(); if (attachment == null) return; - //自定义消息 + //自定義消息 CustomAttachment customAttachment = (CustomAttachment) msg.getAttachment(); if (customAttachment.getFirst() == CUSTOM_MSG_HEADER_TYPE_AUCTION || customAttachment.getFirst() == CustomAttachment.CUSTOM_MSG_HEADER_TYPE_GIFT @@ -685,7 +685,7 @@ public final class IMNetEaseManager { //邀請上麥 noticeInviteUpMic(queueMsgAttachment.micPosition, queueMsgAttachment.uid); if (AvRoomDataManager.get().isQueuingMicro()) { - //判断自定义消息的昵称是不是为空,为空过滤。旧版可能为空 + //判斷自定義消息的昵稱是不是為空,為空過濾。舊版可能為空 if (!TextUtils.isEmpty(queueMsgAttachment.targetNick)) { addMessages(msg); } @@ -694,11 +694,11 @@ public final class IMNetEaseManager { //踢他下麥 if (Objects.equals(queueMsgAttachment.uid, String.valueOf(uid))) { int micPosition = AvRoomDataManager.get().getMicPosition(uid); - //经调试,因为之前已经回调过下麦事件,这里的position是获取不到的 - //不知道这么写的原因是什么 (lvzebiao备注) + //經調試,因為之前已經回調過下麥事件,這裏的position是獲取不到的 + //不知道這麼寫的原因是什麼 (lvzebiao備註) noticeKickDownMic(micPosition); } - //只有下麦需要添加消息,修复房主拉人上麦,出现空公屏的bug + //只有下麥需要添加消息,修復房主拉人上麥,出現空公屏的bug addMessages(msg); } break; @@ -714,22 +714,22 @@ public final class IMNetEaseManager { targetUid = opAttachment.getInfo().getTargetUid(); } if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_KICK_DOWN_MIC) { - //超管踢人下麦 + //超管踢人下麥 if (Objects.equals(String.valueOf(currUid), targetUid)) { noticeKickDownMicBySAdmin(String.valueOf(targetUid)); } addMessages(msg); } else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_MUTE_MIC || second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_LOCK_MIC) { - //锁麦 闭麦 逻辑基本一样 + //鎖麥 閉麥 邏輯基本一樣 addMessages(msg); } else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_KICK_OUT_ROOM || second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_MARK_BLACK) { - //拉黑 踢普通人出房间 + //拉黑 踢普通人出房間 addMessages(msg); noticeReceivedKickOrBlackBySAdmin(opAttachment); } else if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SUPER_ADMIN_KICK_OUT_ADMIN) { - //踢管理员出房间 + //踢管理員出房間 noticeReceivedKickOrBlackBySAdmin(opAttachment); addMessages(msg); @@ -764,7 +764,7 @@ public final class IMNetEaseManager { if (customAttachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_GIFT) { GiftAttachment giftAttachment = (GiftAttachment) attachment; GiftInfo giftInfo = giftAttachment.getGiftReceiveInfo().getGift(); - // 兼容旧版发过来的giftAttachment没有发送giftInfo的问题 + // 兼容舊版發過來的giftAttachment沒有發送giftInfo的問題 giftInfo = giftInfo == null ? GiftModel.get().findGiftInfoById(giftAttachment.getGiftReceiveInfo().getGiftId()) : giftInfo; giftAttachment.getGiftReceiveInfo().setGift(giftInfo); @@ -782,7 +782,7 @@ public final class IMNetEaseManager { if (customAttachment.getSecond() == CustomAttachment.CUSTOM_MSG_SUB_TYPE_SEND_MULTI_GIFT) { MultiGiftAttachment multiGiftAttachment = (MultiGiftAttachment) attachment; GiftInfo giftInfo1 = multiGiftAttachment.getMultiGiftReceiveInfo().getGift(); - // 兼容旧版发过来的giftAttachment没有发送giftInfo的问题 + // 兼容舊版發過來的giftAttachment沒有發送giftInfo的問題 giftInfo1 = giftInfo1 == null ? GiftModel.get().findGiftInfoById(multiGiftAttachment.getMultiGiftReceiveInfo().getGiftId()) : giftInfo1; multiGiftAttachment.getMultiGiftReceiveInfo().setGift(giftInfo1); @@ -808,7 +808,7 @@ public final class IMNetEaseManager { break; case CUSTOM_MESS_HEAD_NOBLE: NobleAttachment nobleMsgAttachment = (NobleAttachment) attachment; - // 是否需要显示在公屏上 + // 是否需要顯示在公屏上 NobleInfo nobleInfo = nobleMsgAttachment.nobleInfo; Map remoteExtension = msg.getRemoteExtension(); if (nobleInfo == null && remoteExtension != null) @@ -821,7 +821,7 @@ public final class IMNetEaseManager { if (second == CUSTOM_MESS_SUB_ROOM_WELCOME) { noticeNobleMemberIn(nobleMsgAttachment); } else if (second == CUSTOM_MESS_SUB_OPENNOBLE) { - // 开通贵族需要展示svga,显示出来,否则只显示公屏 + // 開通貴族需要展示svga,顯示出來,否則只顯示公屏 if (NobleUtil.needShowSvgaOpenEffect(nobleInfo.getLevel())) noticeOpenNoble(nobleMsgAttachment); } @@ -853,9 +853,9 @@ public final class IMNetEaseManager { } break; case CUSTOM_MSG_HEADER_TYPE_SEND_MAGIC: - // 如果本地没有的话,尝试获取服务器最新列表 - // iOS那边没传url,如果是首次接收的话,可能缓存没有 - // 改成访问成功,再处理消息 + // 如果本地沒有的話,嘗試獲取服務器最新列表 + // iOS那邊沒傳url,如果是首次接收的話,可能緩存沒有 + // 改成訪問成功,再處理消息 MagicModel.get().getLocalMagicList() .subscribe(new DontWarnObserver>() { @Override @@ -878,7 +878,7 @@ public final class IMNetEaseManager { MagicModel.get().handleMagicGiftValue(customAttachment); break; case CUSTOM_MSG_HEADER_TYPE_KICK_MIC: - // 如果本地没有的话,尝试获取服务器最新列表 + // 如果本地沒有的話,嘗試獲取服務器最新列表 if (second == CUSTOM_MSG_SUB_TYPE_SEND_KICK_ROOM) { RoomQueueMsgAttachment magicAttachment = (RoomQueueMsgAttachment) attachment; noticeReceivedKickRoom(magicAttachment); @@ -928,7 +928,7 @@ public final class IMNetEaseManager { case CUSTOM_MSG_SUB_BOX_IN_ROOM: case CUSTOM_MSG_SUB_BOX_ALL_ROOM: if (AvRoomDataManager.get().isOpenPureMode()) { - // 纯净模式打开后,仅能看跟自己相关的砸蛋消息 + // 純凈模式打開後,僅能看跟自己相關的砸蛋消息 RoomBoxPrizeAttachment roomBoxPrizeAttachment = (RoomBoxPrizeAttachment) msg.getAttachment(); if (Objects.equals(roomBoxPrizeAttachment.getUid(), AuthModel.get().getCurrentUid())) { addMessages(msg); @@ -940,7 +940,7 @@ public final class IMNetEaseManager { case CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY: case CUSTOM_MSG_SUB_BOX_ALL_ROOM_NOTIFY_BY_SVGA: if (AvRoomDataManager.get().isOpenPureMode()) { - // 纯净模式打开后,仅能看跟自己相关的砸蛋消息 + // 純凈模式打開後,僅能看跟自己相關的砸蛋消息 RoomBoxPrizeAttachment roomBoxPrizeAttachment = (RoomBoxPrizeAttachment) msg.getAttachment(); if (Objects.equals(roomBoxPrizeAttachment.getUid(), AuthModel.get().getCurrentUid())) { addMessages(msg); @@ -1029,12 +1029,12 @@ public final class IMNetEaseManager { RoomPkAttachment roomPkAttachment = (RoomPkAttachment) msg.getAttachment(); Map inviteMap = roomPkAttachment.getRoomPKInvitedUpMicMemberMap(); - //这里判断这条消息是否有人被邀请进队,否则不显示消息 + //這裏判斷這條消息是否有人被邀請進隊,否則不顯示消息 Iterator> iterator = inviteMap.entrySet().iterator(); boolean isInTeam = false; while (iterator.hasNext()) { RoomPKInvitedUpMicMember value = iterator.next().getValue(); - //已经在队伍里面的人就不显示进队伍 + //已經在隊伍裏面的人就不顯示進隊伍 if (PkModel.get().getTeamIdInPKMemberList(value.getUid()) > 0) { continue; } @@ -1046,19 +1046,19 @@ public final class IMNetEaseManager { addMessagesImmediately(msg); } - //自己查看队伍里面有没有自己的id,有的话更新自己的麦序信息 + //自己查看隊伍裏面有沒有自己的id,有的話更新自己的麥序信息 inviteInPKTeam(inviteMap); break; case CUSTOM_MESS_SUB_ROOM_PK_MODE_OPEN: Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_018) + msg.getUuid() + " account:" + msg.getFromAccount() + " ClientType:" + msg.getFromClientType() + ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_019) + msg.getTime()); Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_020) + msg.getAttachment().toJson(false)); - //更新房间PK信息 + //更新房間PK信息 PkModel.get().onReceivePKCreate(((RoomPkAttachment) msg.getAttachment()).getRoomPkData()); noticePKInfo(); addMessages(msg); break; case CUSTOM_MESS_SUB_ROOM_PK_MODE_CLOSE: - //所有人收到这个消息在麦上,取消自己的队伍 + //所有人收到這個消息在麥上,取消自己的隊伍 PkModel.get().onClosePk(); pkCloseUpdateSelfMicInfo(); addMessages(msg); @@ -1066,7 +1066,7 @@ public final class IMNetEaseManager { case CUSTOM_MESS_SUB_ROOM_PK_MODE_START: Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_021) + msg.getUuid() + " account:" + msg.getFromAccount() + " ClientType:" + msg.getFromClientType() + ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_022) + msg.getTime()); Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_023) + msg.getAttachment().toJson(false)); - //开始pk + //開始pk RoomPkData roomPkData = ((RoomPkAttachment) msg.getAttachment()).getRoomPkData(); roomPkData.setCurPkTimeUntilEnd(roomPkData.getDuration()); PkModel.get().onReceivePKBegin(roomPkData); @@ -1082,12 +1082,12 @@ public final class IMNetEaseManager { case CUSTOM_MESS_SUB_ROOM_PK_RESULT: Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_024) + msg.getUuid() + " account:" + msg.getFromAccount() + " ClientType:" + msg.getFromClientType() + ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_025) + msg.getTime()); Logger.e(ResUtil.getString(R.string.xchat_android_core_manager_imneteasemanager_026) + msg.getAttachment().toJson(false)); - //其他途径更新了PK结果 + //其他途徑更新了PK結果 if (PkModel.get().getCurPkInfo() != null && PkModel.get().getCurPkInfo().getPkStatus() == RoomPkData.PK_STATUS_AFTER_PK) { break; } - //通知PK模块处理结束 + //通知PK模塊處理結束 PkModel.get().onReceivePKResult(((RoomPkAttachment) msg.getAttachment()).getRoomPkData()); addMessages(msg); break; @@ -1122,7 +1122,7 @@ public final class IMNetEaseManager { sendLeaveModeEvent(leaveModeAttachment.nick, leaveModeAttachment.gender, leaveModeAttachment.avatar); } break; - //活动的暴走倒计时触发 + //活動的暴走倒計時觸發 case CustomAttachment.CUSTOM_MSG_HEADER_TYPE_ACTIVITY: if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_ACTIVITY_TIMER) { ActivityTimerAttachment activityTimerAttachment = @@ -1138,7 +1138,7 @@ public final class IMNetEaseManager { EventBus.getDefault().post(new ActivityTimerEvent(timerBean)); } break; - //公屏欢迎语 + //公屏歡迎語 case CustomAttachment.CUSTOM_MSG_HEADER_TYPE_PUBLIC_SCREEN: if (second == CustomAttachment.CUSTOM_MSG_SUB_TYPE_PUBLIC_SCREEN_WELCOME) { WelcomeAttachment welcomeAttachment = (WelcomeAttachment) msg.getAttachment(); @@ -1199,7 +1199,7 @@ public final class IMNetEaseManager { datingAttachment); addMessages(message); noticeRoomEvent(message, RoomEvent.DATING_PUBLISH_RESULT); - //延迟发送消息,是心动则在Svga时长上加一秒,避免过早结束,选人则是SELECT_ANIM_DURATION时长,没选择就是0了 + //延遲發送消息,是心動則在Svga時長上加一秒,避免過早結束,選人則是SELECT_ANIM_DURATION時長,沒選擇就是0了 return Observable.timer(datingNotifyInfo.getHasHeart() ? (datingNotifyInfo.getSvgaSecond() * 1000 + 1000) : (datingNotifyInfo.getHasSelectUser() ? SELECT_ANIM_DURATION : 0), TimeUnit.MILLISECONDS); }) @@ -1215,7 +1215,7 @@ public final class IMNetEaseManager { break; case CUSTOM_MSG_ROOM_PK: RoomPkBean roomPkBean = ((RoomPKAttachment) msg.getAttachment()).getRoomPkBean(); - //点击去围观切换房间可能会收到之前房间的消息,要忽略掉 + //點擊去圍觀切換房間可能會收到之前房間的消息,要忽略掉 if (roomPkBean.getCUid() != 0 && roomPkBean.getCUid() != AvRoomDataManager.get().getRoomUid()) { break; } @@ -1346,7 +1346,7 @@ public final class IMNetEaseManager { private void pkCloseUpdateSelfMicInfo() { if (AvRoomDataManager.get().isOnMic(AuthModel.get().getCurrentUid())) { UserModel.get().getCacheLoginUserInfo().setGroupType(PKTeamInfo.TEAM_NONE); - //在麦上就更新信息 + //在麥上就更新信息 AvRoomModel.get().updateMyMicQueue( AvRoomDataManager.get().getMicPosition(AuthModel.get().getCurrentUid()), String.valueOf(AvRoomDataManager.get().mCurrentRoomInfo.getRoomId()), @@ -1359,13 +1359,13 @@ public final class IMNetEaseManager { private void inviteInPKTeam(Map inviteMap) { for (Map.Entry stringRoomPKInvitedUpMicMemberEntry : inviteMap.entrySet()) { RoomPKInvitedUpMicMember value = stringRoomPKInvitedUpMicMemberEntry.getValue(); - //自己查看队伍里面有没有自己的id,有的话更新自己的麦序信息 + //自己查看隊伍裏面有沒有自己的id,有的話更新自己的麥序信息 if (String.valueOf(AuthModel.get().getCurrentUid()).equals(value.getUid())) { - //更新麦序 + //更新麥序 AvRoomModel.get().updateOrUpMic(value).subscribe(); } - //如果没在麦上,通知邀请上麦的相关UI逻辑,如:自己退出排麦队列...等。 + //如果沒在麥上,通知邀請上麥的相關UI邏輯,如:自己退出排麥隊列...等。 if (!AvRoomDataManager.get().isOwnerOnMic()) { noticePKInviteUpMic(value.getUid()); } @@ -1399,7 +1399,7 @@ public final class IMNetEaseManager { } /** - * 拉黑/踢出房间 + * 拉黑/踢出房間 */ private void noticeReceivedKickOrBlackBySAdmin(SuperAdminOpAttachment attachment) { String targetUid = null; @@ -1416,7 +1416,7 @@ public final class IMNetEaseManager { } /** - * 自己被超管踢出房间 + * 自己被超管踢出房間 */ private void noticeMyselfKickOutBySAdmin(SuperAdminOpAttachment attachment) { String targetUid = null; @@ -1426,8 +1426,8 @@ public final class IMNetEaseManager { if (targetUid == null) { targetUid = ""; } - //如果avroom的实例存在,由avroom执行退出房间 - //如果不存在,由main执行退出房间 + //如果avroom的實例存在,由avroom執行退出房間 + //如果不存在,由main執行退出房間 getChatRoomEventObservable() .onNext(new RoomEvent() .setEvent(RoomEvent.MY_SELF_KICK_OUT_ROOM_BY_S_ADMIN) @@ -1442,7 +1442,7 @@ public final class IMNetEaseManager { } /** - * 成员进入房间 + * 成員進入房間 */ private void chatRoomMemberIn(final String account, ChatRoomMessage msg) { List list = new ArrayList<>(1); @@ -1456,7 +1456,7 @@ public final class IMNetEaseManager { chatRoomMember.setAvatar(messageExtension.getSenderAvatar()); extensionMap = messageExtension.getSenderExtension(); } - //如果这里昵称不为空则用这个,公屏通知也用的这个,messageExtension里面的基本是空的 + //如果這裏昵稱不為空則用這個,公屏通知也用的這個,messageExtension裏面的基本是空的 ChatRoomNotificationAttachment attachment = (ChatRoomNotificationAttachment) msg.getAttachment(); String senderNick = ""; List nicks = attachment.getTargetNicks(); @@ -1484,7 +1484,7 @@ public final class IMNetEaseManager { fromUid = (String) extensionDataMap.get("fromUid"); } - //扩展字段是自己服务器的,更新及时点 + //擴展字段是自己服務器的,更新及時點 if (extensionDataMap.containsKey("avatar")) { chatRoomMember.setAvatar((String) extensionDataMap.get("avatar")); } @@ -1514,7 +1514,7 @@ public final class IMNetEaseManager { if (!needToHideEnterMessage(msg)) { addMessagesImmediately(msg); - //需要稍微延迟点,否则有冲突 + //需要稍微延遲點,否則有沖突 new Handler().postDelayed(() -> noticeMemBerInNotice(msg), 500); } else { if (Objects.equals(String.valueOf(AuthModel.get().getCurrentUid()), account)) { @@ -1537,7 +1537,7 @@ public final class IMNetEaseManager { /** - * 退出房间处理 + * 退出房間處理 */ private void chatRoomMemberExit(String account) { noticeRoomMemberChange(false, account); @@ -1560,12 +1560,12 @@ public final class IMNetEaseManager { removeManagerMember(removeChatMember); } - // 这里要清理调退出房间的PK 队员 + // 這裏要清理調退出房間的PK 隊員 PkModel.get().onTeamMemberExitRoom(account); } /** - * 麦序更新 + * 麥序更新 * * @param extension - */ @@ -1592,7 +1592,7 @@ public final class IMNetEaseManager { RoomQueueInfo roomQueueInfo = AvRoomDataManager.get().mMicQueueMemberMap.get(roomMicInfo.getPosition()); if (roomQueueInfo != null) { roomQueueInfo.mRoomMicInfo = roomMicInfo; - //处理声网声音相关的 + //處理聲網聲音相關的 if (roomQueueInfo.mChatRoomMember != null) { if (AvRoomDataManager.get().isOwner(roomQueueInfo.mChatRoomMember.getAccount())) { AudioEngineManager.get().setRole( @@ -1606,7 +1606,7 @@ public final class IMNetEaseManager { /** - * 麦序状态,房间信息 + * 麥序狀態,房間信息 * * @param msg - */ @@ -1614,8 +1614,8 @@ public final class IMNetEaseManager { ChatRoomNotificationAttachment notificationAttachment = (ChatRoomNotificationAttachment) msg.getAttachment(); Map extension = notificationAttachment.getExtension(); if (extension != null) { - // 1----房间信息更新 2-----麦序信息更新 - // 3----更新房间信息和麦序信息(排麦模式) + // 1----房間信息更新 2-----麥序信息更新 + // 3----更新房間信息和麥序信息(排麥模式) int type = (int) extension.get("type"); if (BuildConfig.DEBUG) { @@ -1634,7 +1634,7 @@ public final class IMNetEaseManager { /** - * 房间信息更新 + * 房間信息更新 * * @param extension -- */ @@ -1652,7 +1652,7 @@ public final class IMNetEaseManager { private void chatRoomQueueChangeNotice(ChatRoomMessage msg) { ChatRoomQueueChangeAttachment roomQueueChangeAttachment = (ChatRoomQueueChangeAttachment) msg.getAttachment(); - //麦上成员信息(uid...) key:坑位 ,content:{"nick":"行走的老者","uid":90972,"gender":1,"avatar":"https://image.zhongjialx.com/Fmtbprx5cGc3KABKjDxs_udJZb3O?imageslim"} + //麥上成員信息(uid...) key:坑位 ,content:{"nick":"行走的老者","uid":90972,"gender":1,"avatar":"https://image.zhongjialx.com/Fmtbprx5cGc3KABKjDxs_udJZb3O?imageslim"} String content = roomQueueChangeAttachment.getContent(); LogUtils.d(content); String key = roomQueueChangeAttachment.getKey(); @@ -1662,7 +1662,7 @@ public final class IMNetEaseManager { case POLL: downMicroQueue(key); - //埋点统计用户上麦时长 + //埋點統計用戶上麥時長 if (AvRoomDataManager.get().isOwnerOnMic()) { Map attributes = new HashMap<>(2); attributes.put("userUid", AuthModel.get().getCurrentUid() + ""); @@ -1670,7 +1670,7 @@ public final class IMNetEaseManager { StatisticManager.Instance().onEventEnd( BasicConfig.INSTANCE.getAppContext(), StatisticsProtocol.EVENT_USER_ON_MIC, - "用户在麦上", + "用戶在麥上", attributes); } @@ -1679,19 +1679,19 @@ public final class IMNetEaseManager { Map senderExtension = msg.getChatRoomMessageExtension().getSenderExtension(); upMicroQueue(content, key, senderExtension); - //埋点统计用户上麦时长 + //埋點統計用戶上麥時長 if (!AvRoomDataManager.get().isOwnerOnMic()) { StatisticManager.Instance().onEventStart( BasicConfig.INSTANCE.getAppContext(), StatisticsProtocol.EVENT_USER_ON_MIC, - "用户在麦上"); + "用戶在麥上"); } break; case PARTCLEAR: break; case BATCH_UPDATE: - // Error 卫明说有逻辑上的bug 禁止使用 + // Error 衛明說有邏輯上的bug 禁止使用 break; case undefined: break; @@ -1700,9 +1700,9 @@ public final class IMNetEaseManager { } /** - * 在麦位的用户退出房间处理退出房间 - * 标题:关于聊天室队列变更通知的特别说明 - * 链接:https://faq.yunxin.163.com/#KB0361 + * 在麥位的用戶退出房間處理退出房間 + * 標題:關於聊天室隊列變更通知的特別說明 + * 鏈接:https://faq.yunxin.163.com/#KB0361 */ private void chatRoomQueueBatchChange(ChatRoomMessage msg) { if (msg.getAttachment() instanceof ChatRoomPartClearAttachment) { @@ -1718,13 +1718,13 @@ public final class IMNetEaseManager { } /** - * 进入聊天室 + * 進入聊天室 */ public void joinAvRoom() { RoomInfo curRoomInfo = AvRoomDataManager.get().mCurrentRoomInfo; if (curRoomInfo == null) return; noticeEnterMessages(); - //个播模式房主进房自动上麦 + //個播模式房主進房自動上麥 if (AvRoomDataManager.get().isSingleRoom() && AvRoomDataManager.get().isRoomOwner()) { AvRoomModel.get().upMicroPhone( -1, @@ -1747,24 +1747,24 @@ public final class IMNetEaseManager { long uid = AuthModel.get().getCurrentUid(); if (curRoomInfo.getUid() == uid) { StatisticManager.Instance().onEventStart(BasicConfig.INSTANCE.getAppContext(), - StatisticsProtocol.EVENT_OPENROOM, "开房"); + StatisticsProtocol.EVENT_OPENROOM, "開房"); } StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_ROOM_LIST_LABEL, - "区分房间标签:" + curRoomInfo.getRoomTag()); + "區分房間標簽:" + curRoomInfo.getRoomTag()); - //进入房间时长 + //進入房間時長 StatisticManager.Instance().onEventStart(BasicConfig.INSTANCE.getAppContext(), - StatisticsProtocol.EVENT_ROOM_LENGTH_OF_STAY_TIME, "在房间内停留时长"); + StatisticsProtocol.EVENT_ROOM_LENGTH_OF_STAY_TIME, "在房間內停留時長"); - //进入房间次数 + //進入房間次數 Map attributes = new HashMap<>(2); attributes.put("userUid", AuthModel.get().getCurrentUid() + ""); attributes.put("roomUid", curRoomInfo.getUid() + ""); StatisticManager.Instance().onEvent( BasicConfig.INSTANCE.getAppContext(), StatisticsProtocol.EVENT_ENTER_ROOM_COUNT, - "进入房间", + "進入房間", attributes); @@ -1778,7 +1778,7 @@ public final class IMNetEaseManager { } /** - * 检查是否是公屏需要的消息,打怪兽的消息不加入公屏 + * 檢查是否是公屏需要的消息,打怪獸的消息不加入公屏 * * @param chatRoomMessage * @return @@ -1868,15 +1868,15 @@ public final class IMNetEaseManager { return roomProcessor; } - /************************云信聊天室 普通操作(每个人都可以使用的) start******************************/ + /************************雲信聊天室 普通操作(每個人都可以使用的) start******************************/ /** - * 发送公屏上的Tip信息 - * 子协议一: 关注房主提示- CustomAttachment.CUSTOM_MSG_SUB_TYPE_ROOM_TIP_SHARE_ROOM - * 子协议二: 分享房间成功的提示- CustomAttachment.CUSTOM_MSG_SUB_TYPE_ROOM_TIP_ATTENTION_ROOM_OWNER + * 發送公屏上的Tip信息 + * 子協議一: 關註房主提示- CustomAttachment.CUSTOM_MSG_SUB_TYPE_ROOM_TIP_SHARE_ROOM + * 子協議二: 分享房間成功的提示- CustomAttachment.CUSTOM_MSG_SUB_TYPE_ROOM_TIP_ATTENTION_ROOM_OWNER * * @param targetUid - - * @param subType -发送公屏上Tip信息的子协议 + * @param subType -發送公屏上Tip信息的子協議 */ public Single sendChatRoomTipMsg(long targetUid, int subType) { return UserModel.get().getUserInfo(targetUid) @@ -1898,7 +1898,7 @@ public final class IMNetEaseManager { ChatRoomMessage message = ChatRoomMessageBuilder.createChatRoomCustomMessage( // 聊天室id roomInfo.getRoomId() + "", - // 自定义消息 + // 自定義消息 roomTipAttachment ); return sendChatRoomMessage(message, false); @@ -1910,7 +1910,7 @@ public final class IMNetEaseManager { } /** - * 发送文本信息 + * 發送文本信息 * * @param message - */ @@ -1929,14 +1929,14 @@ public final class IMNetEaseManager { chatRoomMessage.setNIMAntiSpamOption(antiSpamOption); if (AntiSpamUtil.checkLocalAntiSpam(chatRoomMessage)) { EventBus.getDefault().post(new AntiSpamEvent()); - return Single.error(new AntiSpamHitException("检测到敏感词,需要过滤,不能发送")); + return Single.error(new AntiSpamHitException("檢測到敏感詞,需要過濾,不能發送")); } else { return sendChatRoomMessage(chatRoomMessage, false); } } /** - * 下麦 + * 下麥 * * @param key -- */ @@ -1948,7 +1948,7 @@ public final class IMNetEaseManager { MicMemberInfo chatRoomMember = roomQueueInfo.mChatRoomMember; RoomPkData roomPkData = PkModel.get().getCurPkInfo(); - //这里处理把这个人添加到队伍,或者移除队伍 + //這裏處理把這個人添加到隊伍,或者移除隊伍 if (roomPkData != null && (roomPkData.getPkStatus() == RoomPkData.PK_STATUS_BEFORE_PK || roomPkData.getPkStatus() == RoomPkData.PK_STATUS_AFTER_PK)) { UserInfo userInfo = new UserInfo(); @@ -1963,18 +1963,18 @@ public final class IMNetEaseManager { String account = roomQueueInfo.mChatRoomMember.getAccount(); if (AvRoomDataManager.get().isOwner(account)) { - // 更新声网闭麦 ,发送状态信息 + // 更新聲網閉麥 ,發送狀態信息 AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_AUDIENCE); } roomQueueInfo.mChatRoomMember = null; - // 通知界面更新麦序信息 + // 通知界面更新麥序信息 noticeDownMic(key, account); } } } /** - * 上麦 + * 上麥 * * @param content -- */ @@ -1990,7 +1990,7 @@ public final class IMNetEaseManager { return; } MicMemberInfo chatRoomMember = gson.fromJson(contentJsonObj, MicMemberInfo.class); - //这里处理把这个人添加到队伍,或者移除队伍 + //這裏處理把這個人添加到隊伍,或者移除隊伍 UserInfo userInfo = new UserInfo(); userInfo.setUid(Long.parseLong(chatRoomMember.getAccount())); userInfo.setNick(chatRoomMember.getNick()); @@ -2005,10 +2005,10 @@ public final class IMNetEaseManager { RoomQueueInfo temp = mMicQueueMemberMap.valueAt(j); if (temp.mChatRoomMember != null && Objects.equals(temp.mChatRoomMember.getAccount(), chatRoomMember.getAccount())) { - //处理同一个人换坑问题 + //處理同一個人換坑問題 temp.mChatRoomMember = null; } - // 允许接收所有人的声网音频流,不会影响本来麦上的静音状态,也不会影响自己操作过的静音按钮 + // 允許接收所有人的聲網音頻流,不會影響本來麥上的靜音狀態,也不會影響自己操作過的靜音按鈕 if (temp.mChatRoomMember != null) { AudioEngineManager.get().setRemoteMute(Long.parseLong(temp.mChatRoomMember.getAccount()), false); } @@ -2017,7 +2017,7 @@ public final class IMNetEaseManager { RoomQueueInfo tempRoomQueueInfo = mMicQueueMemberMap.get(micPosition); if (tempRoomQueueInfo != null && tempRoomQueueInfo.mChatRoomMember != null && !Objects.equals(tempRoomQueueInfo.mChatRoomMember.getAccount(), chatRoomMember.getAccount())) { - //被挤下麦的情况 + //被擠下麥的情況 noticeDownCrowdedMic(micPosition, tempRoomQueueInfo.mChatRoomMember.getAccount()); } @@ -2029,17 +2029,17 @@ public final class IMNetEaseManager { } chatRoomMember.setExtension(extension); roomQueueInfo.mChatRoomMember = chatRoomMember; - // 这个人上麦后,恢复之前他因为是黑麦被禁言 + // 這個人上麥後,恢復之前他因為是黑麥被禁言 AudioEngineManager.get().setRemoteMute(Long.parseLong(chatRoomMember.getAccount()), false); - //重新更新队列,队列上是否还有自己 + //重新更新隊列,隊列上是否還有自己 if (!AvRoomDataManager.get().isOwnerOnMic()) { - //处理可能自己被挤下还能说话的情况 + //處理可能自己被擠下還能說話的情況 AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_AUDIENCE); } if (AvRoomDataManager.get().isOwner(chatRoomMember.getAccount())) { - //开麦 + //開麥 AudioEngineManager.get().setRole(Constants.CLIENT_ROLE_BROADCASTER); AudioEngineManager.get().setMute(roomQueueInfo.mRoomMicInfo.isMicMute() || AvRoomDataManager.get().mIsNeedOpenMic); } @@ -2067,7 +2067,7 @@ public final class IMNetEaseManager { @Override public void onFailed(int code) { - e.onError(new Exception("错误码: " + code)); + e.onError(new Exception("錯誤碼: " + code)); } @Override @@ -2080,12 +2080,12 @@ public final class IMNetEaseManager { .observeOn(AndroidSchedulers.mainThread()); } - /************************云信聊天室 普通操作 end******************************/ + /************************雲信聊天室 普通操作 end******************************/ - /************************云信聊天室 房主/管理员操作 begin******************************/ + /************************雲信聊天室 房主/管理員操作 begin******************************/ /** - * 增加管理员 + * 增加管理員 * * @param chatRoomMember - */ @@ -2094,7 +2094,7 @@ public final class IMNetEaseManager { } /** - * 增加管理员 + * 增加管理員 * * @param account - */ @@ -2110,7 +2110,7 @@ public final class IMNetEaseManager { if (AvRoomDataManager.get().isOwner(chatRoomMember.getAccount())) { AvRoomDataManager.get().mOwnerMember = chatRoomMember; } - // 放在这里的原因是,只有管理员身份改变了才能发送通知 + // 放在這裏的原因是,只有管理員身份改變了才能發送通知 noticeManagerChange(true, account); } } @@ -2143,7 +2143,7 @@ public final class IMNetEaseManager { } /** - * 增加黑名单 + * 增加黑名單 * * @param account - */ @@ -2160,11 +2160,11 @@ public final class IMNetEaseManager { } /** - * 加入黑名单 + * 加入黑名單 * * @param roomId - * @param account - - * @param mark true:设置,false:取消 + * @param mark true:設置,false:取消 */ public void markBlackListBySdk(String roomId, final String account, final boolean mark, final CallBack callBack) { NIMClient.getService(ChatRoomService.class) @@ -2180,9 +2180,9 @@ public final class IMNetEaseManager { @Override public void onFailed(int i) { if (i == 417) { - SingleToastUtil.showToast("重复操作~"); + SingleToastUtil.showToast("重復操作~"); } else { - SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失败,请重试"); + SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失敗,請重試"); } if (callBack != null) { callBack.onFail(i, ""); @@ -2191,7 +2191,7 @@ public final class IMNetEaseManager { @Override public void onException(Throwable throwable) { - SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失败,请重试"); + SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失敗,請重試"); if (callBack != null) { callBack.onFail(-1, throwable.getMessage()); } @@ -2200,11 +2200,11 @@ public final class IMNetEaseManager { } /** - * 设置管理员 + * 設置管理員 * * @param roomId - - * @param account 要设置的管理员id - * @param mark true:设置,false:取消 + * @param account 要設置的管理員id + * @param mark true:設置,false:取消 */ public void markManagerListBySdk(String roomId, final String account, final boolean mark, final CallBack callBack) { NIMClient.getService(ChatRoomService.class) @@ -2221,9 +2221,9 @@ public final class IMNetEaseManager { @Override public void onFailed(int i) { if (i == 417) { - SingleToastUtil.showToast(mark ? "对方已经是管理员了" : "移除管理员成功"); + SingleToastUtil.showToast(mark ? "對方已經是管理員了" : "移除管理員成功"); } else { - SingleToastUtil.showToast("操作失败,请重试"); + SingleToastUtil.showToast("操作失敗,請重試"); } if (callBack != null) { callBack.onFail(i, ""); @@ -2232,7 +2232,7 @@ public final class IMNetEaseManager { @Override public void onException(Throwable throwable) { - SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失败,请重试"); + SingleToastUtil.showToast(BasicConfig.INSTANCE.getAppContext(), "操作失敗,請重試"); if (callBack != null) { callBack.onFail(-1, throwable.getMessage()); } @@ -2241,7 +2241,7 @@ public final class IMNetEaseManager { } /** - * 下麦 + * 下麥 * * @param micPosition - * @param callBack - @@ -2256,9 +2256,9 @@ public final class IMNetEaseManager { @Override public void onSuccess(Entry stringStringEntry) { if (callBack != null) - callBack.onSuccess("下麦成功"); + callBack.onSuccess("下麥成功"); - //下麦接口 + //下麥接口 GiftValueMrg.get().requestDownMic(micPosition, downMicUid); } @@ -2266,24 +2266,24 @@ public final class IMNetEaseManager { @Override public void onFailed(int i) { if (callBack != null) { - callBack.onFail(-1, "下麦失败"); + callBack.onFail(-1, "下麥失敗"); } } @Override public void onException(Throwable throwable) { if (callBack != null) { - callBack.onFail(-1, "下麦异常:" + throwable.getMessage()); + callBack.onFail(-1, "下麥異常:" + throwable.getMessage()); } } }); } /** - *

下麦

- * 云信聊天室队列服务:取出队列头部或者指定元素 + *

下麥

+ * 雲信聊天室隊列服務:取出隊列頭部或者指定元素 *

roomId - 聊天室id

- *

key - 需要取出的元素的唯一键。若为 null,则表示取出队头元素

+ *

key - 需要取出的元素的唯一鍵。若為 null,則表示取出隊頭元素

* * @param micPosition - */ @@ -2297,26 +2297,26 @@ public final class IMNetEaseManager { if (result.exception != null) e.onError(result.exception); else if (result.code != BaseMvpModel.RESULT_OK) - e.onError(new Throwable("错误码: " + result.code)); + e.onError(new Throwable("錯誤碼: " + result.code)); else { - e.onSuccess("下麦回调成功"); + e.onSuccess("下麥回調成功"); } }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()) .doOnSuccess(s -> GiftValueMrg.get().requestDownMic(micPosition, downMicUid)); } /** - * 加入/移除黑名单 - *

添加/移出聊天室黑名单

+ * 加入/移除黑名單 + *

添加/移出聊天室黑名單

* Parameters: * isAdd - true:添加, false:移出 - * memberOption - 请求参数,包含聊天室id,帐号id以及可选的扩展字段 + * memberOption - 請求參數,包含聊天室id,帳號id以及可選的擴展字段 * Returns: - * InvocationFuture 可以设置回调函数。回调中返回成员信息 + * InvocationFuture 可以設置回調函數。回調中返回成員信息 * * @param roomId - * @param account - - * @param mark true:设置,false:取消 + * @param mark true:設置,false:取消 */ public Single markBlackListBySdk(final String roomId, final String account, final boolean mark, String nick) { RoomQueueMsgAttachment queueMsgAttachment = new RoomQueueMsgAttachment(CUSTOM_MSG_HEADER_TYPE_KICK_MIC, @@ -2332,17 +2332,17 @@ public final class IMNetEaseManager { } /** - * 加入/移除黑名单 - *

添加/移出聊天室黑名单

+ * 加入/移除黑名單 + *

添加/移出聊天室黑名單

* Parameters: * isAdd - true:添加, false:移出 - * memberOption - 请求参数,包含聊天室id,帐号id以及可选的扩展字段 + * memberOption - 請求參數,包含聊天室id,帳號id以及可選的擴展字段 * Returns: - * InvocationFuture 可以设置回调函数。回调中返回成员信息 + * InvocationFuture 可以設置回調函數。回調中返回成員信息 * * @param roomId - * @param account - - * @param mark true:设置,false:取消 + * @param mark true:設置,false:取消 */ public Single markBlackListBySdk(final String roomId, final String account, final boolean mark) { return Single.create((SingleOnSubscribe) e -> { @@ -2351,19 +2351,19 @@ public final class IMNetEaseManager { if (result.exception != null) e.onError(result.exception); else if (result.code != BaseMvpModel.RESULT_OK) - e.onError(new Exception("错误码: " + result.code)); + e.onError(new Exception("錯誤碼: " + result.code)); else { - e.onSuccess("黑名单处理回调成功"); + e.onSuccess("黑名單處理回調成功"); } }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()); } /** - * 踢出房间 + * 踢出房間 * * @param roomId 聊天室 id - * @param account 踢出成员帐号。仅管理员可以踢;如目标是管理员仅创建者可以踢 - * @param notifyExtension 被踢通知扩展字段,这个字段会放到被踢通知的扩展字段中 + * @param account 踢出成員帳號。僅管理員可以踢;如目標是管理員僅創建者可以踢 + * @param notifyExtension 被踢通知擴展字段,這個字段會放到被踢通知的擴展字段中 */ public Single kickMemberFromRoomBySdk(final long roomId, final long account, final Map notifyExtension) { return Single.create(new SingleOnSubscribe() { @@ -2377,12 +2377,12 @@ public final class IMNetEaseManager { .setCallback(new RequestCallback() { @Override public void onSuccess(Void param) { - e.onSuccess("踢人出房间回调成功"); + e.onSuccess("踢人出房間回調成功"); } @Override public void onFailed(int code) { - e.onError(new Exception("错误码: " + code)); + e.onError(new Exception("錯誤碼: " + code)); } @Override @@ -2396,10 +2396,10 @@ public final class IMNetEaseManager { } /** - * 踢出房间 + * 踢出房間 * * @param roomId 聊天室 id - * @param account 踢出成员帐号。仅管理员可以踢;如目标是管理员仅创建者可以踢 + * @param account 踢出成員帳號。僅管理員可以踢;如目標是管理員僅創建者可以踢 */ public Single kickMemberFromRoomBySdk(final long roomId, final long account, String nick) { @@ -2416,7 +2416,7 @@ public final class IMNetEaseManager { } /** - * 更改房间声音品质 + * 更改房間聲音品質 * * @param roomId 聊天室 id */ @@ -2430,7 +2430,7 @@ public final class IMNetEaseManager { } /** - * 开启关闭公屏 + * 開啟關閉公屏 * * @param roomId 聊天室 id */ @@ -2454,7 +2454,7 @@ public final class IMNetEaseManager { /** - * 关闭房间礼物特效 + * 關閉房間禮物特效 * * @param roomId 聊天室 id */ @@ -2468,10 +2468,10 @@ public final class IMNetEaseManager { } /** - * 邀请上麦的自定义消息 + * 邀請上麥的自定義消息 * - * @param baseInfo 上麦用户信息 - * @param position 要上麦的位置 + * @param baseInfo 上麥用戶信息 + * @param position 要上麥的位置 */ public Single inviteMicroPhoneBySdk(final BaseInfo baseInfo, final int position) { final RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo; @@ -2505,7 +2505,7 @@ public final class IMNetEaseManager { .filter(new Predicate() { @Override public boolean test(ChatRoomMessage chatRoomMessage) throws Exception { - //上麦条件:游客不在麦上 或者是管理员,房主 + //上麥條件:遊客不在麥上 或者是管理員,房主 return (!AvRoomDataManager.get().isOnMic(micUid) || AvRoomDataManager.get().isRoomOwner() || AvRoomDataManager.get().isRoomAdmin()) @@ -2526,10 +2526,10 @@ public final class IMNetEaseManager { } /** - * 踢人下麦 发自定义消息 + * 踢人下麥 發自定義消息 * - * @param micUid 被踢用户uid - * @param roomId 房间ID + * @param micUid 被踢用戶uid + * @param roomId 房間ID */ public Single kickMicroPhoneBySdk(long micUid, String micNick, long roomId) { RoomQueueMsgAttachment queueMsgAttachment = new RoomQueueMsgAttachment(CUSTOM_MSG_HEADER_TYPE_QUEUE, @@ -2547,14 +2547,14 @@ public final class IMNetEaseManager { String level = (String) NobleUtil.getResource(NobleResourceType.KEY_LEVEL, roomQueueInfo.mChatRoomMember); String name = NobleUtil.getNobleName(level); if (!NobleUtil.canKickMicroOrNot(level)) { - return Single.error(new Exception(name + "不能被踢下麦")); + return Single.error(new Exception(name + "不能被踢下麥")); } } return sendChatRoomMessage(message, false); } /** - * 超管踢人下麦 + * 超管踢人下麥 */ public Single kickMicroBySdkBySAdmin(long micUid, String micNick, long roomId) { SuperAdminOpAttachment attachment = new SuperAdminOpAttachment( @@ -2573,11 +2573,11 @@ public final class IMNetEaseManager { /** - * 发送贵族进场自定义消息 + * 發送貴族進場自定義消息 * - * @param nobleInfo 贵族信息 - * @param nick 昵称 - * @param uid 帐号id + * @param nobleInfo 貴族信息 + * @param nick 昵稱 + * @param uid 帳號id * @return Single */ public Single sendNobleInRoomMsgBySdk(final NobleInfo nobleInfo, @@ -2605,9 +2605,9 @@ public final class IMNetEaseManager { } /** - * 发送座驾进场自定义消息 + * 發送座駕進場自定義消息 * - * @param carInfo 座驾信息 + * @param carInfo 座駕信息 * @param uid * @param nick * @return @@ -2637,18 +2637,18 @@ public final class IMNetEaseManager { } - /************************云信聊天室 房主/管理员操作 end******************************/ + /************************雲信聊天室 房主/管理員操作 end******************************/ /** - *

发送 云信聊天室信息

- *

返回的是一个观察者,需要subscribe才会开始发送信息

- *

不关心信息发送是否成功的,可以直接调用无参subscribe()方法, - * 相反关心的则需要在subscribe(new Consumer(..){...})方法中通过Consumer来消耗事件

- *

ps: 无参subscribe()方法调用如果发生错误,会在rxjava的error handler中得到回调,默认的实现在application的onCreate中

+ *

發送 雲信聊天室信息

+ *

返回的是一個觀察者,需要subscribe才會開始發送信息

+ *

不關心信息發送是否成功的,可以直接調用無參subscribe()方法, + * 相反關心的則需要在subscribe(new Consumer(..){...})方法中通過Consumer來消耗事件

+ *

ps: 無參subscribe()方法調用如果發生錯誤,會在rxjava的error handler中得到回調,默認的實現在application的onCreate中

* - * @param chatRoomMessage 自定义的聊天室信息 - * @param resend 是否自动重发 - * @return 返回一个可被observer观察订阅的observable + * @param chatRoomMessage 自定義的聊天室信息 + * @param resend 是否自動重發 + * @return 返回一個可被observer觀察訂閱的observable */ public Single sendChatRoomMessage(final ChatRoomMessage chatRoomMessage, final boolean resend) { if (chatRoomMessage == null) { @@ -2673,7 +2673,7 @@ public final class IMNetEaseManager { @Override public void onFailed(int code) { - e.onError(new Exception("错误码: " + code)); + e.onError(new Exception("錯誤碼: " + code)); } @Override @@ -2747,7 +2747,7 @@ public final class IMNetEaseManager { if (listener != null) { listener.onFailed(retryChatRoomMessage.getRetryCount(), error); } - //如果已经退出房间或者已经更换房间,则不在重连 + //如果已經退出房間或者已經更換房間,則不在重連 if (isExitRoom()) { error = error + ", exited room when ready retry, retryCount:" + retryChatRoomMessage.getRetryCount(); @@ -2772,7 +2772,7 @@ public final class IMNetEaseManager { /** - * 云信发送消息 + * 雲信發送消息 * * @param message * @return @@ -2788,7 +2788,7 @@ public final class IMNetEaseManager { @Override public void onFailed(int code) { - e.onError(new Exception("错误码: " + code)); + e.onError(new Exception("錯誤碼: " + code)); } @Override @@ -2800,7 +2800,7 @@ public final class IMNetEaseManager { } /** - * 云信发送消息 + * 雲信發送消息 * * @param message * @return @@ -2816,7 +2816,7 @@ public final class IMNetEaseManager { @Override public void onFailed(int code) { - e.onError(new Exception("错误码: " + code)); + e.onError(new Exception("錯誤碼: " + code)); } @Override @@ -2828,16 +2828,16 @@ public final class IMNetEaseManager { } /** - * 云信发送消息 + * 雲信發送消息 * * @param message * @return */ public void sendChatRoomMessage(final ChatRoomMessage message, CallBack callBack) { - // 发送消息。如果需要关心发送结果,可设置回调函数。发送完成时,会收到回调。如果失败,会有具体的错误码。 + // 發送消息。如果需要關心發送結果,可設置回調函數。發送完成時,會收到回調。如果失敗,會有具體的錯誤碼。 IMNetEaseManager.get().sendChatRoomMessage(message, false) .subscribe((chatRoomMessage, throwable) -> { - //这里回调发送结果 + //這裏回調發送結果 if (callBack != null) { if (throwable == null) { callBack.onSuccess(message); @@ -2849,7 +2849,7 @@ public final class IMNetEaseManager { } /** - * 云信查询本地数据 + * 雲信查詢本地數據 * * @param uuid 消息 UUID * @return @@ -2864,7 +2864,7 @@ public final class IMNetEaseManager { } /** - * 保存数据到本地数据库 + * 保存數據到本地數據庫 * * @param message 消息本身 * @return @@ -2874,7 +2874,7 @@ public final class IMNetEaseManager { } /** - * 保存数据到本地数据库 + * 保存數據到本地數據庫 * * @param message 消息本身 * @param notify 是否通知更新界面 @@ -2886,7 +2886,7 @@ public final class IMNetEaseManager { } /** - * 更新消息到数据库 + * 更新消息到數據庫 * * @param message */ @@ -2896,12 +2896,12 @@ public final class IMNetEaseManager { } /** - * 分享家族时使用的发送云信自定义消息的方法 + * 分享家族時使用的發送雲信自定義消息的方法 * * @param sessionType 取值: * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#P2P} 私聊 * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#Team} 群聊 - * @param sessionId 如果是私聊,则为用户 UID;如果是群聊,则为群组的 teamId + * @param sessionId 如果是私聊,則為用戶 UID;如果是群聊,則為群組的 teamId */ public void sendSharingRoomMessage(int sessionType, String sessionId) { InAppSharingRoomInfo inAppSharingRoomInfo = new InAppSharingRoomInfo(); @@ -2911,10 +2911,10 @@ public final class IMNetEaseManager { } UserInfo userInfo = UserModel.get().getCacheLoginUserInfo(); inAppSharingRoomInfo.setInfo(currentRoomInfo); - inAppSharingRoomInfo.setTitle(String.format("我想邀请你进入:%1$s, 和我一起愉快的玩耍~", + inAppSharingRoomInfo.setTitle(String.format("我想邀請你進入:%1$s, 和我一起愉快的玩耍~", currentRoomInfo.getTitle())); inAppSharingRoomInfo.setAvatar(currentRoomInfo.getAvatar() != null ? currentRoomInfo.getAvatar() : ""); - inAppSharingRoomInfo.setActionName("立即进入"); + inAppSharingRoomInfo.setActionName("立即進入"); inAppSharingRoomInfo.setRouterType(RouterType.ROOM); inAppSharingRoomInfo.setRouterValue(String.valueOf(currentRoomInfo.getUid())); InAppSharingRoomAttachment attachment = new InAppSharingRoomAttachment(); @@ -2928,16 +2928,16 @@ public final class IMNetEaseManager { } /** - * 分享房间时使用的发送云信自定义消息的方法 + * 分享房間時使用的發送雲信自定義消息的方法 * * @param sessionType 取值: * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#P2P} 私聊 * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#Team} 群聊 - * @param sessionId 如果是私聊,则为用户 UID;如果是群聊,则为群组的 teamId + * @param sessionId 如果是私聊,則為用戶 UID;如果是群聊,則為群組的 teamId */ public void sendSharingFamilyMessage(int sessionType, String sessionId, FamilyInfo familyInfo) { - //群太多这里了去掉群,成员,游戏,防止家族转json时候 超出云信4096长度限制 + //群太多這裏了去掉群,成員,遊戲,防止家族轉json時候 超出雲信4096長度限製 FamilyInfo temp = new Gson().fromJson(new Gson().toJson(familyInfo), FamilyInfo.class); temp.setGroups(new ArrayList<>()); temp.setGames(new ArrayList<>()); @@ -2946,7 +2946,7 @@ public final class IMNetEaseManager { InAppSharingFamilyInfo inAppSharingFamilyInfo = new InAppSharingFamilyInfo(); UserInfo userInfo = UserModel.get().getCacheLoginUserInfo(); inAppSharingFamilyInfo.setInfo(temp); - inAppSharingFamilyInfo.setTitle(String.format("我想邀请你加入:%1$s, 和我一起愉快的玩耍~", + inAppSharingFamilyInfo.setTitle(String.format("我想邀請你加入:%1$s, 和我一起愉快的玩耍~", temp.getFamilyName())); inAppSharingFamilyInfo.setAvatar(temp.getFamilyIcon() != null ? temp.getFamilyIcon() : ""); inAppSharingFamilyInfo.setActionName("立即加入"); @@ -2964,7 +2964,7 @@ public final class IMNetEaseManager { /** - * 分享话题时使用的发送云信自定义消息的方法 + * 分享話題時使用的發送雲信自定義消息的方法 */ public void sendSharingMiniWorldMessage(int sessionType, String sessionId, MiniWorldDetailInfo detailInfo) { @@ -2977,9 +2977,9 @@ public final class IMNetEaseManager { String showTitle; if (detailInfo.isInWorld() && currentMember != null) { String worldName = TextUtils.isEmpty(detailInfo.getName()) ? "" : detailInfo.getName(); - showTitle = "作为“" + worldName + "”的第" + currentMember.getMemberNo() + "位成员,世界那么大,我想带你一起去看看~"; + showTitle = "作為「" + worldName + "」的第" + currentMember.getMemberNo() + "位成員,世界那麼大,我想帶你一起去看看~"; } else { - showTitle = "世界那么大,我想带你一起去看看~"; + showTitle = "世界那麼大,我想帶你一起去看看~"; } inAppSharingMiniWorldInfo.setTitle(showTitle); inAppSharingMiniWorldInfo.setAvatar(TextUtils.isEmpty(detailInfo.getIcon()) ? "" : detailInfo.getIcon()); @@ -2997,19 +2997,19 @@ public final class IMNetEaseManager { } /** - * 分享群组时使用的发送云信自定义消息的方法 + * 分享群組時使用的發送雲信自定義消息的方法 * * @param sessionType 取值: * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#P2P} 私聊 * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#Team} 群聊 - * @param sessionId 如果是私聊,则为用户 UID;如果是群聊,则为群组的 teamId - * @param teamInfo 群组信息(必须包含 ID 和名字) + * @param sessionId 如果是私聊,則為用戶 UID;如果是群聊,則為群組的 teamId + * @param teamInfo 群組信息(必須包含 ID 和名字) */ public void sendSharingTeamMessage(int sessionType, String sessionId, TeamInfo teamInfo) { InAppSharingTeamInfo inAppSharingTeamInfo = new InAppSharingTeamInfo(); UserInfo userInfo = UserModel.get().getCacheLoginUserInfo(); inAppSharingTeamInfo.setInfo(teamInfo); - inAppSharingTeamInfo.setTitle(String.format("我想邀请你加入:%1$s, 和我一起愉快的玩耍~", + inAppSharingTeamInfo.setTitle(String.format("我想邀請你加入:%1$s, 和我一起愉快的玩耍~", teamInfo.getName())); inAppSharingTeamInfo.setAvatar(userInfo != null ? userInfo.getAvatar() : ""); inAppSharingTeamInfo.setActionName("立即加入"); @@ -3026,14 +3026,14 @@ public final class IMNetEaseManager { } /** - * 发送红包时,发送云信自定义消息 + * 發送紅包時,發送雲信自定義消息 * * @param sessionType 取值: * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#P2P} 私聊 * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#Team} 群聊 - * @param teamId 如果是私聊,则为用户 UID;如果是群聊,则为群组的 teamId - * @param uid 用户 UID - * @param luckyMoneyInfo 红包信息(请求发送红包接口后获得) + * @param teamId 如果是私聊,則為用戶 UID;如果是群聊,則為群組的 teamId + * @param uid 用戶 UID + * @param luckyMoneyInfo 紅包信息(請求發送紅包接口後獲得) */ public void sendLuckyMoneyMessage(int sessionType, String teamId, String uid, LuckyMoneyInfo luckyMoneyInfo) { luckyMoneyInfo.setClaimStatus(LuckyMoneyInfo.STATE_NOT_OPEN); @@ -3049,14 +3049,14 @@ public final class IMNetEaseManager { } /** - * 领取群红包时,发送云信 tips 的自定义消息 + * 領取群紅包時,發送雲信 tips 的自定義消息 * * @param sessionType 取值: * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#P2P} 私聊 * {@link com.netease.nimlib.sdk.msg.constant.SessionTypeEnum#Team} 群聊 - * @param teamId 如果是私聊,则为用户 UID;如果是群聊,则为群组的 teamId - * @param uid 用户 UID - * @param luckyMoneyInfo 红包实体 + * @param teamId 如果是私聊,則為用戶 UID;如果是群聊,則為群組的 teamId + * @param uid 用戶 UID + * @param luckyMoneyInfo 紅包實體 */ public void receiveLuckyMoneyMessage(int sessionType, String teamId, String uid, LuckyMoneyInfo luckyMoneyInfo) { LuckyMoneyTipsAttachment attachment = new LuckyMoneyTipsAttachment(); @@ -3072,10 +3072,10 @@ public final class IMNetEaseManager { } /** - * 更新红包信息 + * 更新紅包信息 * * @param uuid 消息 UUID - * @param luckyMoneyInfo 红包实体 + * @param luckyMoneyInfo 紅包實體 */ public void updateLuckyMoneyMessage(String uuid, LuckyMoneyInfo luckyMoneyInfo) { IMMessage message = queryMessageByUuid(uuid); @@ -3088,10 +3088,10 @@ public final class IMNetEaseManager { } /** - * 更新系统消息到本地数据库 + * 更新系統消息到本地數據庫 * * @param uuid 消息 UUID - * @param sysMsgInfo 系统消息实体 + * @param sysMsgInfo 系統消息實體 */ public void updateErbanSysMsgInfoMessage(String uuid, ErbanSysMsgInfo sysMsgInfo) { IMMessage message = queryMessageByUuid(uuid); @@ -3104,10 +3104,10 @@ public final class IMNetEaseManager { } /** - * 更新系统消息到本地数据库 + * 更新系統消息到本地數據庫 * * @param uuid 消息 UUID - * @param sysMsgV2Info 系统消息实体 + * @param sysMsgV2Info 系統消息實體 */ public void updateErbanSysMsgV2InfoMessage(String uuid, ErbanSysMsgV2Info sysMsgV2Info) { IMMessage message = queryMessageByUuid(uuid); @@ -3209,7 +3209,7 @@ public final class IMNetEaseManager { } /** - * 超管踢人下麦 + * 超管踢人下麥 */ private void noticeKickDownMicBySAdmin(String account) { getChatRoomEventObservable().onNext(new RoomEvent() @@ -3235,8 +3235,8 @@ public final class IMNetEaseManager { .setEvent(RoomEvent.DOWN_MIC) .setAccount(account) .setMicPosition(micPosition)); - //此处进行礼物值的处理,不放在fragment,防止消息未处理前,fragment已被销毁 - //下麦的处理 + //此處進行禮物值的處理,不放在fragment,防止消息未處理前,fragment已被銷毀 + //下麥的處理 GiftValueMrg.get().handleDownMic(micPosition, account); } @@ -3271,7 +3271,7 @@ public final class IMNetEaseManager { } /** - * 被挤下麦通知 + * 被擠下麥通知 */ private void noticeDownCrowdedMic(int position, String account) { getChatRoomEventObservable().onNext(new RoomEvent() @@ -3279,7 +3279,7 @@ public final class IMNetEaseManager { .setMicPosition(position) .setAccount(account) ); - //挤下麦这种情况不好模拟,礼物值代码 + //擠下麥這種情況不好模擬,禮物值代碼 GiftValueMrg.get().handleDownCrowdedMic(position, account); } @@ -3386,7 +3386,7 @@ public final class IMNetEaseManager { } /** - * 记录用户一天进入的房间id,隔天重置 + * 記錄用戶一天進入的房間id,隔天重置 */ private boolean saveCurrentDayRoomId(long roomId) { String ids = (String) SharedPreferenceUtils.get(IMNetEaseManager.ROOM_ENTER_DAY + AuthModel.get().getCurrentUid(), ""); @@ -3423,11 +3423,11 @@ public final class IMNetEaseManager { } /** - * 公屏本地添加房间介绍信息 + * 公屏本地添加房間介紹信息 */ private void sendDescMessage(ChatRoomMessage chatRoomMessage) { - // 仅房主不提示 + // 僅房主不提示 if (AvRoomDataManager.get().isRoomOwner()) return; @@ -3436,7 +3436,7 @@ public final class IMNetEaseManager { if (roomInfo == null) { return; } - // 判断当天是否已经进入过此直播间 + // 判斷當天是否已經進入過此直播間 boolean isCurrentDayEnter = saveCurrentDayRoomId(roomInfo.getUid()); if (!TextUtils.isEmpty(from)) { @@ -3487,7 +3487,7 @@ public final class IMNetEaseManager { getChatRoomEventObservable().onNext(new RoomEvent().setEvent(RoomEvent.LEAVE_MODE)); } - //释放退出房间云信需要释放的资源 + //釋放退出房間雲信需要釋放的資源 public void release() { mCacheRoomQueueInfo = null; if (datingDisposable != null) { diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/room/model/HomePartyModel.java b/core/src/main/java/com/yizhuan/xchat_android_core/room/model/HomePartyModel.java index 4bb5cb7b8..7bf355f09 100644 --- a/core/src/main/java/com/yizhuan/xchat_android_core/room/model/HomePartyModel.java +++ b/core/src/main/java/com/yizhuan/xchat_android_core/room/model/HomePartyModel.java @@ -34,7 +34,7 @@ import retrofit2.http.FormUrlEncoded; import retrofit2.http.POST; /** - *

轰趴房model层:数据获取

+ *

轟趴房model層:數據獲取

* * @author jiahui * @date 2017/12/8 @@ -47,12 +47,12 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel { } /** - * 锁坑 + * 鎖坑 */ @Override public Single 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 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() { @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 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> 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> datingOpen(@Field("roomUid") long roomUid); /** - * 关闭相亲模式 + * 關閉相親模式 * * @return */ @@ -291,7 +291,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel { Single> datingClose(@Field("roomUid") long roomUid); /** - * 相亲开始下一步 + * 相親開始下一步 * * @return */ @@ -300,7 +300,7 @@ public class HomePartyModel extends RoomBaseModel implements IHomePartyModel { Single> datingNext(@Field("roomUserId") long roomUserId); /** - * 相亲选人 + * 相親選人 * * @return */