aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 749d6a408..c0ebb1338 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -2198,10 +2198,14 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
activity.xmppConnectionService.updateConversation(conversation);
}
updateChatMsgHint();
- new Handler().post(() -> {
- int size = messageList.size();
- this.binding.messagesView.setSelection(size - 1);
- });
+ SharedPreferences p = PreferenceManager.getDefaultSharedPreferences(activity);
+ final boolean prefScrollToBottom = p.getBoolean("scroll_to_bottom", activity.getResources().getBoolean(R.bool.scroll_to_bottom));
+ if (prefScrollToBottom || scrolledToBottom()) {
+ new Handler().post(() -> {
+ int size = messageList.size();
+ this.binding.messagesView.setSelection(size - 1);
+ });
+ }
}
public void setFocusOnInputField() {