Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: disable click command to send #36

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update ChatActivityEnterView.java
  • Loading branch information
omg-xtao committed Feb 12, 2024
commit f84d12041e686482e31a6773b79f8fa44b7db723
Original file line number Diff line number Diff line change
Expand Up @@ -9159,7 +9159,6 @@ 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;
Expand All @@ -9180,8 +9179,9 @@ public void setCommand(MessageObject messageObject, String command, boolean long
}
} else {
// Na: DisableClickCommandToSend
boolean disableClickCommandToSend = NaConfig.INSTANCE.getDisableClickCommandToSend().Bool();
if (disableClickCommandToSend) break ifLongPress;
if (NaConfig.INSTANCE.getDisableClickCommandToSend().Bool()) {
return;
}

if (slowModeTimer > 0 && !isInScheduleMode()) {
if (delegate != null) {
Expand Down
Loading