aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/EditMessage.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-03-06 22:22:50 +0100
committeriNPUTmice <daniel@gultsch.de>2015-03-06 22:22:50 +0100
commitcbca92d2099a9b3096b7ed6fbe0e5e8758f746fc (patch)
treec3786769592bed2897efba327312470a8cae529a /src/main/java/eu/siacs/conversations/ui/EditMessage.java
parent44028a547f23306cb8e88b0cb5b950e3c543fd34 (diff)
fixed enter is send option
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/EditMessage.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditMessage.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/EditMessage.java b/src/main/java/eu/siacs/conversations/ui/EditMessage.java
index 57fa72858..a58cf2b8b 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditMessage.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditMessage.java
@@ -37,10 +37,9 @@ public class EditMessage extends EditText {
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_ENTER) {
- if (keyboardListener != null) {
- keyboardListener.onEnterPressed();
+ if (keyboardListener != null && keyboardListener.onEnterPressed()) {
+ return true;
}
- return true;
}
return super.onKeyDown(keyCode, event);
}
@@ -70,7 +69,7 @@ public class EditMessage extends EditText {
}
public interface KeyboardListener {
- public void onEnterPressed();
+ public boolean onEnterPressed();
public void onTypingStarted();
public void onTypingStopped();
public void onTextDeleted();