1.房间公屏消息长度增长 2.发起私聊限制 3.移除公会成员刷新列表

This commit is contained in:
oujunhui
2020-10-14 16:04:26 +08:00
parent 89c1fe8336
commit 3403ebaad7
12 changed files with 129 additions and 41 deletions

View File

@@ -161,7 +161,7 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
boolean isTextAudioSwitchShow = getArguments().getBoolean("isTextAudioSwitchShow", true);
inputPanel = new InputPanel(container, rootView, getActionList(), isTextAudioSwitchShow);
inputPanel.setCustomization(customization);
inputPanel.setLimitLevel(limitLevel, currentLevel);
inputPanel.setLimitLevel(true, "");
if (moreCustomDrawable > 0 && moreCustomId > 0) // 自定义更多按钮只响应哪个功能
inputPanel.setMoreFuntionButtonInInputBar(moreCustomDrawable, moreCustomId);

View File

@@ -121,8 +121,9 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
private volatile boolean disable;
private int limitLevel;
private int currentLevel;
private String hintText;
private boolean isChat;
public InputPanel(Container container, View view, List<BaseAction> actions, boolean isTextAudioSwitchShow) {
this.container = container;
@@ -434,7 +435,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
// 切换成音频,收起键盘,按钮切换成键盘
private void switchToAudioLayout() {
if (currentLevel < limitLevel) {
if (!isChat) {
SingleToastUtil.showToast("等级不够");
return;
}
@@ -461,7 +462,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
for (BaseAction action : actions) {
if (action.getTitleId() == moreCustomId) {
if (currentLevel < limitLevel) {
if (!isChat) {
SingleToastUtil.showToast("等级不够");
} else {
action.onClick();
@@ -483,7 +484,7 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
// 点击表情,切换到表情布局
private void toggleEmojiLayout() {
if (currentLevel < limitLevel) {
if (!isChat) {
SingleToastUtil.showToast("等级不够");
} else {
if (emoticonPickerView == null || emoticonPickerView.getVisibility() == View.GONE) {
@@ -960,15 +961,15 @@ public class InputPanel implements IEmoticonSelectedListener, IAudioRecordCallba
container.proxy.sendMessage(customMessage);
}
public void setLimitLevel(int limitLevel, int currentLevel) {
this.limitLevel = limitLevel;
this.currentLevel = currentLevel;
public void setLimitLevel(boolean isChat,String msg) {
this.isChat = isChat;
this.hintText = msg;
setEditTextState();
}
private void setEditTextState() {
if (currentLevel < limitLevel) {
messageEditText.setHint("用户等级不足" + limitLevel + "级, 不可以发言哦");
if (!isChat) {
messageEditText.setHint(hintText);
messageEditText.setFocusable(false);
messageEditText.setFocusableInTouchMode(false);
messageEditText.setEnabled(false);