diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
index 5c89449b1a..9df01fa008 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java
@@ -9159,6 +9159,7 @@ public void setCommand(MessageObject messageObject, String command, boolean long
if (command == null || getVisibility() != VISIBLE || messageEditText == null) {
return;
}
+ ifLongPress:
if (longPress) {
String text = messageEditText.getText().toString();
TLRPC.User user = messageObject != null && DialogObject.isChatDialog(dialog_id) ? accountInstance.getMessagesController().getUser(messageObject.messageOwner.from_id.user_id) : null;
@@ -9178,6 +9179,10 @@ public void setCommand(MessageObject messageObject, String command, boolean long
openKeyboard();
}
} else {
+ // Na: DisableClickCommandToSend
+ boolean disableClickCommandToSend = NaConfig.INSTANCE.getDisableClickCommandToSend().Bool();
+ if (disableClickCommandToSend) break ifLongPress;
+
if (slowModeTimer > 0 && !isInScheduleMode()) {
if (delegate != null) {
delegate.onUpdateSlowModeButton(slowModeButton, true, slowModeButton.getText());
diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java
index 0e81d6ad4f..1620fb82cf 100644
--- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java
+++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoChatSettingsActivity.java
@@ -153,6 +153,7 @@ public class NekoChatSettingsActivity extends BaseNekoXSettingsActivity implemen
private final AbstractConfigCell hideBotButtonInInputFieldRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getHideBotButtonInInputField()));
private final AbstractConfigCell doNotUnarchiveBySwipeRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDoNotUnarchiveBySwipe()));
private final AbstractConfigCell disableMarkdownRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableMarkdown()));
+ private final AbstractConfigCell disableClickCommandToSendRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableClickCommandToSend(), LocaleController.getString(R.string.DisableClickCommandToSendHint)));
private final AbstractConfigCell dividerInteractions = cellGroup.appendCell(new ConfigCellDivider());
// Sticker
diff --git a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt
index 2aca58207c..73b6abd5d0 100644
--- a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt
+++ b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt
@@ -518,6 +518,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
+ val disableClickCommandToSend =
+ addConfig(
+ "DisableClickCommandToSend",
+ ConfigItem.configTypeBool,
+ false
+ )
private fun addConfig(
k: String,
diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
index b2f7e03446..a1a9a1fb34 100644
--- a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
+++ b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
@@ -120,4 +120,6 @@
要关注我们的功能介绍频道吗 ?
功能介绍频道
GIF 显示得更小
+ 禁用点击指令文本发送
+ 妈妈再也不用担心我会误触啦
diff --git a/TMessagesProj/src/main/res/values/strings_na.xml b/TMessagesProj/src/main/res/values/strings_na.xml
index bf2de15564..a47eb98dbe 100644
--- a/TMessagesProj/src/main/res/values/strings_na.xml
+++ b/TMessagesProj/src/main/res/values/strings_na.xml
@@ -120,4 +120,6 @@
Want to follow our features tips channel?
Features Tips Channel
Show Small Gif
+ Disable click command text to send
+ To prevent accidental touch