feat:去掉本地一键匹配的忽略私聊限制:由后端处理
This commit is contained in:
@@ -104,7 +104,7 @@ class FriendsFragment : BaseBindingFragment<HomeFriendsFragmentBinding>() {
|
||||
dialogManager.dismissDialog()
|
||||
it?.let {
|
||||
if (it.isNotEmpty()) {
|
||||
NimP2PMessageActivity.startWithIgnoreChatLimit(context, it)
|
||||
NimP2PMessageActivity.start(context, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -159,15 +159,6 @@ public class NimP2PMessageActivity extends NewBaseMessageActivity {
|
||||
startReal(context, contactId, new Intent());
|
||||
}
|
||||
|
||||
/**
|
||||
* 忽略聊天限制
|
||||
*/
|
||||
public static void startWithIgnoreChatLimit(Context context, String contactId) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Extras.EXTRA_IGNORE_CHAT_LIMIT, true);
|
||||
startReal(context, contactId, intent);
|
||||
}
|
||||
|
||||
public static void start(Context context, String contactId, boolean isFromVoiceMatch) {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra(Extras.EXTRA_ACCOUNT, contactId);
|
||||
|
@@ -127,7 +127,6 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
private RxPermissions rxPermissions;
|
||||
private boolean isChat;
|
||||
private String hintText;
|
||||
private boolean ignoreChatLimit;
|
||||
private Observer<List<MessageReceipt>> messageReceiptObserver = new Observer<List<MessageReceipt>>() {
|
||||
@Override
|
||||
public void onEvent(List<MessageReceipt> messageReceipts) {
|
||||
@@ -222,7 +221,6 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
}
|
||||
|
||||
private void parseIntent() {
|
||||
ignoreChatLimit = getArguments().getBoolean(Extras.EXTRA_IGNORE_CHAT_LIMIT, false);
|
||||
sessionId = getArguments().getString(Extras.EXTRA_ACCOUNT);
|
||||
ChatterBoxHelper.reset();
|
||||
ChatterBoxHelper.sessionId = sessionId;
|
||||
@@ -241,9 +239,6 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
if (inputPanel == null) {
|
||||
inputPanel = new InputPanel(container, rootView, getActionList());
|
||||
inputPanel.setCustomization(customization);
|
||||
if (ignoreChatLimit) {
|
||||
isChat = true;
|
||||
}
|
||||
inputPanel.setLimitLevel(isChat, hintText);
|
||||
} else {
|
||||
inputPanel.reload(container, customization);
|
||||
@@ -660,10 +655,6 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private void loadChatLimit(boolean sessionIsEmpty) {
|
||||
if (ignoreChatLimit) {
|
||||
Log.d(TAG, "#ignore");
|
||||
return;
|
||||
}
|
||||
IMCustomModel.get().getPrivateChatLimit(sessionId).subscribe(((privateChatLimitInfo, throwable) -> {
|
||||
if (isDestroyed()) {
|
||||
return;
|
||||
@@ -680,6 +671,9 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
if (limitInfo == null) {
|
||||
return;
|
||||
}
|
||||
if (inputPanel == null) {
|
||||
return;
|
||||
}
|
||||
int model = limitInfo.getModel();
|
||||
if (model == 2) {
|
||||
isChat = limitInfo.isChat();
|
||||
|
@@ -27,8 +27,6 @@ public interface Extras {
|
||||
// 参数
|
||||
String EXTRA_ACCOUNT = "account";
|
||||
String EXTRA_TYPE = "type";
|
||||
// 忽略限制
|
||||
String EXTRA_IGNORE_CHAT_LIMIT = "ignore_chat_limit";
|
||||
String EXTRA_ANCHOR = "anchor";
|
||||
|
||||
String EXTRA_CUSTOMIZATION = "customization";
|
||||
|
Reference in New Issue
Block a user