mirror of https://github.com/M66B/FairEmail.git
Reply move/inbox
This commit is contained in:
parent
813ee4b3cc
commit
424c702266
|
@ -104,6 +104,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||||
private SwitchCompat swForwardNew;
|
private SwitchCompat swForwardNew;
|
||||||
private SwitchCompat swLookupMx;
|
private SwitchCompat swLookupMx;
|
||||||
private SwitchCompat swReplyMove;
|
private SwitchCompat swReplyMove;
|
||||||
|
private SwitchCompat swReplyMoveInbox;
|
||||||
|
|
||||||
private final static String[] RESET_OPTIONS = new String[]{
|
private final static String[] RESET_OPTIONS = new String[]{
|
||||||
"keyboard", "keyboard_no_fullscreen",
|
"keyboard", "keyboard_no_fullscreen",
|
||||||
|
@ -120,7 +121,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||||
"attach_new", "auto_link", "plain_only", "format_flowed", "usenet_signature", "remove_signatures",
|
"attach_new", "auto_link", "plain_only", "format_flowed", "usenet_signature", "remove_signatures",
|
||||||
"receipt_default", "receipt_type", "receipt_legacy",
|
"receipt_default", "receipt_type", "receipt_legacy",
|
||||||
"forward_new",
|
"forward_new",
|
||||||
"lookup_mx", "reply_move"
|
"lookup_mx", "reply_move", "reply_move_inbox"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -182,6 +183,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||||
swForwardNew = view.findViewById(R.id.swForwardNew);
|
swForwardNew = view.findViewById(R.id.swForwardNew);
|
||||||
swLookupMx = view.findViewById(R.id.swLookupMx);
|
swLookupMx = view.findViewById(R.id.swLookupMx);
|
||||||
swReplyMove = view.findViewById(R.id.swReplyMove);
|
swReplyMove = view.findViewById(R.id.swReplyMove);
|
||||||
|
swReplyMoveInbox = view.findViewById(R.id.swReplyMoveInbox);
|
||||||
|
|
||||||
List<StyleHelper.FontDescriptor> fonts = StyleHelper.getFonts(getContext());
|
List<StyleHelper.FontDescriptor> fonts = StyleHelper.getFonts(getContext());
|
||||||
|
|
||||||
|
@ -577,6 +579,14 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
prefs.edit().putBoolean("reply_move", checked).apply();
|
prefs.edit().putBoolean("reply_move", checked).apply();
|
||||||
|
swReplyMoveInbox.setEnabled(checked);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
swReplyMoveInbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
prefs.edit().putBoolean("reply_move_inbox", checked).apply();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -716,6 +726,8 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
|
||||||
swForwardNew.setChecked(prefs.getBoolean("forward_new", true));
|
swForwardNew.setChecked(prefs.getBoolean("forward_new", true));
|
||||||
swLookupMx.setChecked(prefs.getBoolean("lookup_mx", false));
|
swLookupMx.setChecked(prefs.getBoolean("lookup_mx", false));
|
||||||
swReplyMove.setChecked(prefs.getBoolean("reply_move", false));
|
swReplyMove.setChecked(prefs.getBoolean("reply_move", false));
|
||||||
|
swReplyMoveInbox.setChecked(prefs.getBoolean("reply_move_inbox", true));
|
||||||
|
swReplyMoveInbox.setEnabled(swReplyMove.isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -529,6 +529,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
||||||
|
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
boolean reply_move = prefs.getBoolean("reply_move", false);
|
boolean reply_move = prefs.getBoolean("reply_move", false);
|
||||||
|
boolean reply_move_inbox = prefs.getBoolean("reply_move_inbox", true);
|
||||||
boolean protocol = prefs.getBoolean("protocol", false);
|
boolean protocol = prefs.getBoolean("protocol", false);
|
||||||
boolean debug = (prefs.getBoolean("debug", false) || BuildConfig.DEBUG);
|
boolean debug = (prefs.getBoolean("debug", false) || BuildConfig.DEBUG);
|
||||||
|
|
||||||
|
@ -573,7 +574,7 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
||||||
if (!m.ui_hide) {
|
if (!m.ui_hide) {
|
||||||
EntityFolder folder = db.folder().getFolder(m.folder);
|
EntityFolder folder = db.folder().getFolder(m.folder);
|
||||||
if (folder != null &&
|
if (folder != null &&
|
||||||
(EntityFolder.INBOX.equals(folder.type) ||
|
((EntityFolder.INBOX.equals(folder.type) && reply_move_inbox) ||
|
||||||
EntityFolder.ARCHIVE.equals(folder.type) ||
|
EntityFolder.ARCHIVE.equals(folder.type) ||
|
||||||
EntityFolder.USER.equals(folder.type))) {
|
EntityFolder.USER.equals(folder.type))) {
|
||||||
sent = folder;
|
sent = folder;
|
||||||
|
|
|
@ -681,12 +681,12 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:drawableStart="@drawable/twotone_warning_24"
|
android:drawableStart="@drawable/twotone_warning_24"
|
||||||
android:drawablePadding="6dp"
|
android:drawablePadding="6dp"
|
||||||
app:drawableTint="?attr/colorWarning"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/title_setup_advanced"
|
android:text="@string/title_setup_advanced"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
android:textColor="?attr/colorWarning"
|
android:textColor="?attr/colorWarning"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
app:drawableTint="?attr/colorWarning"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
@ -872,6 +872,18 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvCheckMxHint"
|
app:layout_constraintTop_toBottomOf="@id/tvCheckMxHint"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/swReplyMoveInbox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_advanced_reply_move_inbox"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/swReplyMove"
|
||||||
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvReplyMoveHint"
|
android:id="@+id/tvReplyMoveHint"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -881,7 +893,7 @@
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
android:textStyle="italic"
|
android:textStyle="italic"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swReplyMove" />
|
app:layout_constraintTop_toBottomOf="@id/swReplyMoveInbox" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -447,6 +447,7 @@
|
||||||
<string name="title_advanced_signature_forward">Use signature when forwarding</string>
|
<string name="title_advanced_signature_forward">Use signature when forwarding</string>
|
||||||
<string name="title_advanced_discard_delete">On discard draft permanently delete draft</string>
|
<string name="title_advanced_discard_delete">On discard draft permanently delete draft</string>
|
||||||
<string name="title_advanced_reply_move">On replying to a message, save the reply in the same folder</string>
|
<string name="title_advanced_reply_move">On replying to a message, save the reply in the same folder</string>
|
||||||
|
<string name="title_advanced_reply_move_inbox">Also for messages in the inbox</string>
|
||||||
|
|
||||||
<string name="title_advanced_auto_link">Automatically create links</string>
|
<string name="title_advanced_auto_link">Automatically create links</string>
|
||||||
<string name="title_advanced_plain_only">Send plain text only by default</string>
|
<string name="title_advanced_plain_only">Send plain text only by default</string>
|
||||||
|
|
Loading…
Reference in New Issue