Revert "Added option for default answer action"

This reverts commit 8a7c3e742d.
pull/212/head
M66B 2 years ago
parent 8a7c3e742d
commit 507e62f5ec

@ -3356,12 +3356,8 @@ public class FragmentMessages extends FragmentBase
if (message == null) if (message == null)
return; return;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
boolean answer_default = prefs.getBoolean("answer_default", false);
if (answer_default)
long_press = !long_press;
if (long_press && message.content) { if (long_press && message.content) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
String answer_action = prefs.getString("answer_action", "reply"); String answer_action = prefs.getString("answer_action", "reply");
if ("reply".equals(answer_action) || if ("reply".equals(answer_action) ||
"reply_all".equals(answer_action) || "reply_all".equals(answer_action) ||

@ -79,7 +79,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private SwitchCompat swDiscardDelete; private SwitchCompat swDiscardDelete;
private Spinner spSendDelayed; private Spinner spSendDelayed;
private Spinner spAnswerAction; private Spinner spAnswerAction;
private SwitchCompat swAnswerDefault;
private Button btnSound; private Button btnSound;
private ViewButtonColor btnComposeColor; private ViewButtonColor btnComposeColor;
@ -122,7 +121,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
"send_reminders", "send_chips", "send_pending", "send_reminders", "send_chips", "send_pending",
"auto_save_paragraph", "auto_save_dot", "discard_delete", "auto_save_paragraph", "auto_save_dot", "discard_delete",
"send_delayed", "send_delayed",
"answer_action", "answer_default", "answer_action",
"sound_sent", "sound_sent",
"compose_color", "compose_font", "compose_color", "compose_font",
"prefix_once", "prefix_count", "alt_re", "alt_fwd", "prefix_once", "prefix_count", "alt_re", "alt_fwd",
@ -162,7 +161,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swDiscardDelete = view.findViewById(R.id.swDiscardDelete); swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
spSendDelayed = view.findViewById(R.id.spSendDelayed); spSendDelayed = view.findViewById(R.id.spSendDelayed);
spAnswerAction = view.findViewById(R.id.spAnswerAction); spAnswerAction = view.findViewById(R.id.spAnswerAction);
swAnswerDefault = view.findViewById(R.id.swAnswerDefault);
btnSound = view.findViewById(R.id.btnSound); btnSound = view.findViewById(R.id.btnSound);
btnComposeColor = view.findViewById(R.id.btnComposeColor); btnComposeColor = view.findViewById(R.id.btnComposeColor);
@ -358,13 +356,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
} }
}); });
swAnswerDefault.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("answer_default", checked).apply();
}
});
btnSound.setOnClickListener(new View.OnClickListener() { btnSound.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -744,8 +735,6 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
break; break;
} }
swAnswerDefault.setChecked(prefs.getBoolean("answer_default", false));
btnComposeColor.setColor(prefs.getInt("compose_color", Color.TRANSPARENT)); btnComposeColor.setColor(prefs.getInt("compose_color", Color.TRANSPARENT));
String compose_font = prefs.getString("compose_font", ""); String compose_font = prefs.getString("compose_font", "");

@ -345,18 +345,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvAnswerAction" /> app:layout_constraintTop_toBottomOf="@id/tvAnswerAction" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swAnswerDefault"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="24dp"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_answer_default"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/spAnswerAction"
app:switchPadding="12dp" />
<Button <Button
android:id="@+id/btnSound" android:id="@+id/btnSound"
style="?android:attr/buttonStyleSmall" style="?android:attr/buttonStyleSmall"
@ -367,7 +355,7 @@
android:drawablePadding="6dp" android:drawablePadding="6dp"
android:text="@string/title_advanced_sound" android:text="@string/title_advanced_sound"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swAnswerDefault" /> app:layout_constraintTop_toBottomOf="@id/spAnswerAction" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>

@ -436,7 +436,6 @@
<string name="title_advanced_send_delayed">Delay sending messages</string> <string name="title_advanced_send_delayed">Delay sending messages</string>
<string name="title_advanced_attach_new">Add shared files to a new draft</string> <string name="title_advanced_attach_new">Add shared files to a new draft</string>
<string name="title_advanced_answer_action">Long pressing on the answer button will:</string> <string name="title_advanced_answer_action">Long pressing on the answer button will:</string>
<string name="title_advanced_answer_default">Use this as the default answer action</string>
<string name="title_advanced_send_pending">Show non-obtrusive send delayed icon</string> <string name="title_advanced_send_pending">Show non-obtrusive send delayed icon</string>
<string name="title_advanced_auto_save_paragraph">Automatically save a draft after every paragraph</string> <string name="title_advanced_auto_save_paragraph">Automatically save a draft after every paragraph</string>

Loading…
Cancel
Save