introduced expert setting to not scroll down after sending a message
This commit is contained in:
parent
ac22007e28
commit
9d15d3b408
|
@ -1904,11 +1904,15 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
activity.xmppConnectionService.updateConversation(conversation);
|
||||
}
|
||||
updateChatMsgHint();
|
||||
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() {
|
||||
this.binding.textinput.requestFocus();
|
||||
|
|
|
@ -41,4 +41,5 @@
|
|||
<bool name="return_to_previous">false</bool>
|
||||
<bool name="validate_hostname">false</bool>
|
||||
<bool name="show_qr_code_scan">true</bool>
|
||||
<bool name="scroll_to_bottom">true</bool>
|
||||
</resources>
|
||||
|
|
|
@ -709,4 +709,6 @@
|
|||
<string name="mtm_notification">Certificate Verification</string>
|
||||
<string name="once">Once</string>
|
||||
<string name="qr_code_scanner_needs_access_to_camera">The QR code scanner needs access to the camera</string>
|
||||
<string name="pref_scroll_to_bottom">Scroll to bottom</string>
|
||||
<string name="pref_scroll_to_bottom_summary">Scroll down after sending a message</string>
|
||||
</resources>
|
||||
|
|
|
@ -257,6 +257,11 @@
|
|||
android:key="display_enter_key"
|
||||
android:summary="@string/pref_display_enter_key_summary"
|
||||
android:title="@string/pref_display_enter_key"/>
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="@bool/scroll_to_bottom"
|
||||
android:key="scroll_to_bottom"
|
||||
android:title="@string/pref_scroll_to_bottom"
|
||||
android:summary="@string/pref_scroll_to_bottom_summary"/>
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_presence_settings">
|
||||
<CheckBoxPreference
|
||||
|
|
Loading…
Reference in New Issue