aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-12 10:39:04 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-12 10:39:04 +0200
commit1bc92482e947abde8a9660baed57b463cd55f403 (patch)
tree72b96ea39faaea12458cd0ea7eeda1d37304f8f7 /src
parentcc209afc517bdb37f8342457e89c6e2695962ffe (diff)
scroll to bottom after sending multi-line message
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 0b4608ba..1c1fcb75 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -10,6 +10,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.os.Bundle;
+import android.os.Handler;
import android.support.annotation.Nullable;
import android.text.InputType;
import android.view.ContextMenu;
@@ -956,10 +957,15 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
private void messageSent() {
- int size = this.messageList.size();
- messagesView.setSelection(size - 1);
mEditMessage.setText("");
updateChatMsgHint();
+ new Handler().post(new Runnable() {
+ @Override
+ public void run() {
+ int size = messageList.size();
+ messagesView.setSelection(size - 1);
+ }
+ });
}
public void setFocusOnInputField() {