diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index cb0e8a0c6..17ca385cc 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -55,7 +55,9 @@ public class IMLoginManager extends BaseCacheManager { * @return */ public int getSelectClarity() { - return getInt(SELECT_CLARITY, 1); + + return getInt(SELECT_CLARITY, 0); + } public boolean isHint() { diff --git a/common/src/main/java/com/yunbao/common/views/LiveRobotMessageCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveRobotMessageCustomPopup.java index f4652a3d6..7a84549d7 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveRobotMessageCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveRobotMessageCustomPopup.java @@ -111,21 +111,28 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { - // 修改助手名字 - LiveNetManager.get(getContext()) - .setAiRobotDate("ai_time", robotNameSetting.getText().toString(), new HttpCallback() { - @Override - public void onSuccess(HttpCallbackModel data) { - robotNameSetting.setVisibility(GONE); - robotTime.setVisibility(VISIBLE); - robotTime.setText(robotNameSetting.getText().toString()); - } + String time = robotNameSetting.getText().toString(); + int timeInt = Integer.parseInt(time); + if (timeInt > 5) { + // 修改助手名字 + LiveNetManager.get(getContext()) + .setAiRobotDate("ai_time", time, new HttpCallback() { + @Override + public void onSuccess(HttpCallbackModel data) { + robotNameSetting.setVisibility(GONE); + robotTime.setVisibility(VISIBLE); + robotTime.setText(robotNameSetting.getText().toString()); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + } else { + ToastUtil.show(R.string.robot_minimum_interval); + } - @Override - public void onError(String error) { - ToastUtil.show(error); - } - }); } return false; @@ -136,7 +143,7 @@ public class LiveRobotMessageCustomPopup extends BottomPopupView { @Override public void onClick(View v) { new XPopup.Builder(getContext()) - .asCustom(new InputCustomPopup(getContext(),R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() { + .asCustom(new InputCustomPopup(getContext(), R.string.automatic_message_sending).setListener(new InputCustomPopup.InputCustomListener() { @Override public void onConfirm(String text) { //添加消息语 diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index be4a81f99..07b3a9a90 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -941,57 +941,57 @@ Limited ride And limited avatar frame Congratulations %s have won %s in the Lucky Angel! The next lucky angel will be you! Guardian group %s people receive - 去完成 - 已領取 - 畫質選擇 - 更多設置 - 查看更多 - 礼物正在获取中... - 開始PK - 剩餘次數:%s - 是否確認進行多人PK(確認後扣除1點次數)當日剩餘次數: %s - 邀請\n主播 - 結束\nPK - 時間 %s + To complete + Already collected + Image quality selection + More Settings + view more + The gift is on the way... + The gift is on the way + Remaining count :%s + Whether to confirm multiple PK (deduct 1 point after confirmation) remaining times on the day: %s + Invite \n anchor + End \nPK + Time %s - 接受 - 拒绝 - 坚持拒绝 - 随机PK提示 + accept + refuse + Persist in refusing + Random PK hint - 自動發言機器人設置 - 機器人開關 - 機器人名字設置 - 字數限制2-8個字 - 自動打招呼設置 - 已配置條數 - 自動發消息設置 - 前往設置 - 感謝送禮、PK開始、PK結束的自動機器人消息,\n暫不支持自定義。 - 添加內容 - 每隔一段時間,機器人自動隨機以下一句話發出。 - 填寫內容推薦,如:求送心願單、加粉絲團等 - 自動發言間隔時間(分鐘) - 最少間隔5分鐘1次 - 當有用戶進入直播間時,機器人會@該用戶並自動 - 隨機以下一句話。最少設置1條,最多20條。 - 機器人設置 - 高清 - 流暢 - 超高清 - 確定清晰度開播後,需要重新開播才能更改 - 開播設置確認 - 清晰度 - 直播頻道 - 開播 - 機器人 - 已設置 - 未設置 - - - 超高清提示 - 在網速不穩定的情況下,選擇超高清將會有可能導致直播間畫面卡頓,是否確認選擇? - 堅持選擇 - 網絡提示 - 系統監測到您的網絡不穩定,設備內存不足將會影響到您的直播流暢度,因此建議您選擇流暢清晰度。 + Automatic speech robot setup + Robot switch + Robot name setting + The word limit is 2 to 8 word + Automatic greeting setting + Number of configured items + Set automatic message sending + Go to set + Thank you for sending gifts, PK start, PK end automatic robot message, \n does not support customization. + Add content + At regular intervals, the robot automatically says the following sentence at random。 + Fill in the content recommendation, such as: send wish list, add fan group, etc + Automatic speech interval (minutes) + At least once every 5 minutes + When a user enters the studio, the robot will @the user and automatically + The following sentence is random. Set a minimum of 1 to a maximum of 20. + Robot setup + High definition + fluency + Ultra hd + After determining the definition of the broadcast, you need to restart the broadcast to change + Confirmation of broadcast Settings + clarity + Live channel + broadcast + robot + set + Not set + no + yes + Ultra HD hint + In the case of unstable network speed, the selection of ultra HD may lead to the delay of the picture in the broadcast room. Do you confirm the selection? + Stick to choice + Network prompt + The system detects that your network is unstable and insufficient device memory will affect the fluency of your live broadcast. Therefore, it is recommended that you choose fluency and clarity. diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java index f1b802e43..418673747 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadyRyViewHolder.java @@ -355,10 +355,15 @@ public class LiveNewReadyRyViewHolder extends AbsViewHolder implements View.OnCl } else if (i == R.id.btn_room_type) { chooseLiveType(); } else if (i == R.id.btn_start_live) { + if (mLiveClassID == 0) { + ToastUtil.show(R.string.live_choose_live_class); + return; + } // startLive(); liveOpenCustomPopup = new LiveOpenCustomPopup(mContext, selectClarity, classBean, liveRoomTypeBean) .setCallBack(new LiveOpenCustomPopup.LiveOpenCallBack() { @Override + public void startLive(LiveRoomTypeBean liveRoomTypeModel, LiveClassBean classModel) { if (classModel != null) { classBean = classModel; diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 6f9d9d03a..63aa213a2 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -1094,8 +1094,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void onKick(String touid) { if (!TextUtils.isEmpty(touid) && touid.equals(CommonAppConfig.getInstance().getUid())) {//被踢的是自己 kick = true; - exitLiveRoom(true); ToastUtil.show(WordUtil.getString(R.string.live_kicked_2)); + onRemove(true); } }