mirror of https://github.com/M66B/FairEmail.git
Added option to disable auto hiding of answer button
This commit is contained in:
parent
4c00db4c12
commit
a372d12ba4
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -795,6 +795,18 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/swResetSnooze"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swAutoHideAnswer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:checked="true"
|
||||
android:text="@string/title_advanced_auto_hide_answer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swAutoBlockSender"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swSwipeReply"
|
||||
android:layout_width="0dp"
|
||||
|
@ -803,7 +815,7 @@
|
|||
android:text="@string/title_advanced_swipe_reply"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swAutoBlockSender"
|
||||
app:layout_constraintTop_toBottomOf="@id/swAutoHideAnswer"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<Button
|
||||
|
|
|
@ -661,6 +661,7 @@
|
|||
<string name="title_advanced_auto_important">Automatically make starred messages important</string>
|
||||
<string name="title_advanced_cancel_snooze">Cancel snooze on moving messages</string>
|
||||
<string name="title_advanced_auto_block_sender">Automatically block the sender when reporting spam</string>
|
||||
<string name="title_advanced_auto_hide_answer">Automatically hide the answer button when scrolling</string>
|
||||
<string name="title_advanced_swipe_reply">Swipe expanded messages to the right to reply</string>
|
||||
<string name="title_advanced_default_snooze">Default snooze/delay time</string>
|
||||
<string name="title_advanced_default_folder">Select default folder</string>
|
||||
|
|
Loading…
Reference in New Issue