tongmengxiao 11 mesi fa
parent
commit
f7e14eb7a7

+ 1 - 0
baseswago/src/main/res/values-ar/strings.xml

@@ -317,4 +317,5 @@
     <string name="go_to_thie_living_now">اذهب إلى غرفة البث المباشر الخاصة بها لرؤيتها</string>
     <string name="system_not_detect_face">لم يكتشف النظام الوجه</string>
     <string name="live_broadcasrt_will_closed_countdown">سيتم إغلاق غرفة البث المباشر بعد العد التنازلي</string>
+    <string name="you_been_banned">لقد تم اسكاتك</string>
 </resources>

+ 1 - 0
baseswago/src/main/res/values-in/strings.xml

@@ -329,4 +329,5 @@
     <string name="go_to_thie_living_now">Pergi ke ruang livenya untuk menemuinya </string>
     <string name="system_not_detect_face">Sistem tidak mendeteksi wajah</string>
     <string name="live_broadcasrt_will_closed_countdown">Ruang live akan ditutup setelah hitungan mundur</string>
+    <string name="you_been_banned">Anda telah dilarang berbicara</string>
 </resources>

+ 1 - 0
baseswago/src/main/res/values-ms/strings.xml

@@ -329,4 +329,5 @@
     <string name="go_to_thie_living_now">Pergi ke ruang livenya untuk menemuinya </string>
     <string name="system_not_detect_face">Sistem tidak mendeteksi wajah</string>
     <string name="live_broadcasrt_will_closed_countdown">Ruang live akan ditutup setelah hitungan mundur</string>
+    <string name="you_been_banned">Anda telah dilarang berbicara</string>
 </resources>

+ 1 - 0
baseswago/src/main/res/values-zh/strings.xml

@@ -317,4 +317,5 @@
     <string name="go_to_thie_living_now">去她的直播间看看她吧</string>
     <string name="system_not_detect_face">系统未检测到人脸</string>
     <string name="live_broadcasrt_will_closed_countdown">直播间将在倒计时后关闭</string>
+    <string name="you_been_banned">你已被禁言</string>
 </resources>

+ 1 - 0
baseswago/src/main/res/values/strings.xml

@@ -349,4 +349,5 @@
     <string name="go_to_thie_living_now">Go to the living room see her now </string>
     <string name="system_not_detect_face">The system did not detect the face</string>
     <string name="live_broadcasrt_will_closed_countdown">The live broadcast room will be closed after the countdown</string>
+    <string name="you_been_banned">You have been muted</string>
 </resources>

+ 8 - 2
room/src/main/java/com/swago/room/dialog/SendMsgDialog.kt

@@ -22,6 +22,7 @@ import com.swago.room.util.IMSender
 import com.swago.room.vm.RoomOtherVm
 import com.tencent.imsdk.v2.V2TIMMessage
 import com.tencent.imsdk.v2.V2TIMValueCallback
+import com.tencent.qcloud.tim.uikit.utils.ToastUtil
 import kotlinx.coroutines.delay
 import kotlinx.coroutines.launch
 import org.json.JSONObject
@@ -156,7 +157,6 @@ class SendMsgDialog : BaseXDFragment<DialogSendMsgBinding>() {
                             roomChatMsgBean.isCup = it.is_cup
                             roomChatMsgBean.isAdmin = SwagoRoomManager.iRoomInfo?.getRoomAdmin()?:0
                             roomChatMsgBean.isFans = SwagoRoomManager.iRoomInfo?.getIsFans()?:0
-                            addSenderMsgToRoomChatList?.invoke(roomChatMsgBean)
 
                             val jsonObject = JSONObject()
                             jsonObject.put("senderId", it.id)
@@ -184,9 +184,15 @@ class SendMsgDialog : BaseXDFragment<DialogSendMsgBinding>() {
                                     object : V2TIMValueCallback<V2TIMMessage> {
                                         override fun onSuccess(t: V2TIMMessage?) {
                                             LogUtil.d("发送成功")
+                                            addSenderMsgToRoomChatList?.invoke(roomChatMsgBean)
                                         }
 
-                                        override fun onError(code: Int, desc: String?) {}
+                                        override fun onError(code: Int, desc: String?) {
+                                            if (code == 10016){
+                                                ToastUtil.toastShortMessage(AppContext.getContext().getString(R.string.you_been_banned))
+                                            }
+
+                                        }
 
                                     },
                                     V2TIMMessage.V2TIM_PRIORITY_NORMAL