diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java
index 88ea08ac0c..cec949af23 100644
--- a/app/src/main/java/eu/faircode/email/FragmentMessages.java
+++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java
@@ -361,6 +361,7 @@ public class FragmentMessages extends FragmentBase
private String onclose;
private boolean quick_scroll;
private boolean addresses;
+ private boolean auto_hide_answer;
private boolean swipe_reply;
private boolean quick_actions;
@@ -510,6 +511,7 @@ public class FragmentMessages extends FragmentBase
onclose = (autoclose ? null : prefs.getString("onclose", null));
quick_scroll = prefs.getBoolean("quick_scroll", true);
addresses = prefs.getBoolean("addresses", false);
+ auto_hide_answer = prefs.getBoolean("auto_hide_answer", true);
swipe_reply = prefs.getBoolean("swipe_reply", false);
quick_actions = prefs.getBoolean("quick_actions", true);
@@ -7033,7 +7035,7 @@ public class FragmentMessages extends FragmentBase
return;
int expanded = (values.containsKey("expanded") ? values.get("expanded").size() : 0);
- if (scrolling && !accessibility)
+ if (auto_hide_answer && scrolling && !accessibility)
fabReply.hide();
else {
if (expanded == 1) {
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptions.java b/app/src/main/java/eu/faircode/email/FragmentOptions.java
index 4aa0311ede..71a3a3e8d9 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptions.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptions.java
@@ -151,7 +151,7 @@ public class FragmentOptions extends FragmentBase {
"collapse_quotes", "image_placeholders", "inline_images",
"seekbar", "actionbar", "actionbar_swap", "actionbar_color", "group_category",
"autoscroll", "swipenav", "reversed", "swipe_close", "swipe_move", "autoexpand", "autoclose", "onclose",
- "thread_sent_trash", "swipe_reply",
+ "thread_sent_trash", "auto_hide_answer", "swipe_reply",
"language_detection",
"quick_filter", "quick_scroll", "quick_actions",
"experiments", "debug", "log_level", "test1", "test2", "test3", "test4", "test5",
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java
index 79eb5a3c5e..cb2f3b89fb 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsBehavior.java
@@ -107,6 +107,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
private SwitchCompat swAutoImportant;
private SwitchCompat swResetSnooze;
private SwitchCompat swAutoBlockSender;
+ private SwitchCompat swAutoHideAnswer;
private SwitchCompat swSwipeReply;
private Button btnDefaultFolder;
private TextView tvDefaultFolder;
@@ -125,7 +126,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
"autoclose", "onclose", "autoclose_unseen", "autoclose_send", "collapse_marked",
"undo_timeout",
"autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance", "thread_sent_trash",
- "reset_snooze", "auto_block_sender", "swipe_reply", "default_folder"
+ "reset_snooze", "auto_block_sender", "auto_hide_answer", "swipe_reply", "default_folder"
};
@Override
@@ -183,6 +184,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swAutoImportant = view.findViewById(R.id.swAutoImportant);
swResetSnooze = view.findViewById(R.id.swResetSnooze);
swAutoBlockSender = view.findViewById(R.id.swAutoBlockSender);
+ swAutoHideAnswer = view.findViewById(R.id.swAutoHideAnswer);
swSwipeReply = view.findViewById(R.id.swSwipeReply);
btnDefaultFolder = view.findViewById(R.id.btnDefaultFolder);
tvDefaultFolder = view.findViewById(R.id.tvDefaultFolder);
@@ -551,6 +553,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
}
});
+ swAutoHideAnswer.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("auto_hide_answer", checked).apply();
+ }
+ });
+
swSwipeReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -705,6 +714,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
swAutoImportant.setChecked(prefs.getBoolean("auto_important", false));
swResetSnooze.setChecked(prefs.getBoolean("reset_snooze", true));
swAutoBlockSender.setChecked(prefs.getBoolean("auto_block_sender", true));
+ swAutoHideAnswer.setChecked(prefs.getBoolean("auto_hide_answer", true));
swSwipeReply.setChecked(prefs.getBoolean("swipe_reply", false));
tvDefaultFolder.setText(prefs.getString("default_folder", null));
}
diff --git a/app/src/main/res/layout/fragment_options_behavior.xml b/app/src/main/res/layout/fragment_options_behavior.xml
index c786b426a3..c069066a2d 100644
--- a/app/src/main/res/layout/fragment_options_behavior.xml
+++ b/app/src/main/res/layout/fragment_options_behavior.xml
@@ -795,6 +795,18 @@
app:layout_constraintTop_toBottomOf="@id/swResetSnooze"
app:switchPadding="12dp" />
+
+