mirror of https://github.com/M66B/FairEmail.git
Moved option
This commit is contained in:
parent
fbc8a983a7
commit
4d72f1771d
|
@ -40,7 +40,7 @@ public class FragmentOptions extends FragmentBase {
|
||||||
static String[] OPTIONS_RESTART = new String[]{
|
static String[] OPTIONS_RESTART = new String[]{
|
||||||
"subscriptions",
|
"subscriptions",
|
||||||
"startup", "cards", "date", "threading", "highlight_unread", "avatars", "generated_icons", "identicons", "circular",
|
"startup", "cards", "date", "threading", "highlight_unread", "avatars", "generated_icons", "identicons", "circular",
|
||||||
"name_email", "subject_top", "subject_italic", "subject_ellipsize", "flags", "preview", "preview_italic",
|
"name_email", "authentication", "subject_top", "subject_italic", "subject_ellipsize", "flags", "preview", "preview_italic",
|
||||||
"addresses", "attachments_alt", "contrast", "monospaced", "inline_images", "collapse_quotes", "autocontent", "seekbar", "actionbar",
|
"addresses", "attachments_alt", "contrast", "monospaced", "inline_images", "collapse_quotes", "autocontent", "seekbar", "actionbar",
|
||||||
"autoscroll", "swipenav", "autoexpand", "autoclose", "onclose",
|
"autoscroll", "swipenav", "autoexpand", "autoclose", "onclose",
|
||||||
"experiments", "debug",
|
"experiments", "debug",
|
||||||
|
|
|
@ -52,12 +52,11 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
private SwitchCompat swAutoRead;
|
private SwitchCompat swAutoRead;
|
||||||
private SwitchCompat swAutoMove;
|
private SwitchCompat swAutoMove;
|
||||||
private SwitchCompat swDiscardDelete;
|
private SwitchCompat swDiscardDelete;
|
||||||
private SwitchCompat swAuthentication;
|
|
||||||
private SwitchCompat swDisableTracking;
|
private SwitchCompat swDisableTracking;
|
||||||
|
|
||||||
private final static String[] RESET_OPTIONS = new String[]{
|
private final static String[] RESET_OPTIONS = new String[]{
|
||||||
"pull", "autoscroll", "swipenav", "doubletap", "expand_read", "autoexpand", "autoclose", "onclose",
|
"pull", "autoscroll", "swipenav", "doubletap", "expand_read", "autoexpand", "autoclose", "onclose",
|
||||||
"collapse", "autoread", "automove", "discard_delete", "authentication", "disable_tracking"
|
"collapse", "autoread", "automove", "discard_delete", "disable_tracking"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -82,7 +81,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
swAutoRead = view.findViewById(R.id.swAutoRead);
|
swAutoRead = view.findViewById(R.id.swAutoRead);
|
||||||
swAutoMove = view.findViewById(R.id.swAutoMove);
|
swAutoMove = view.findViewById(R.id.swAutoMove);
|
||||||
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
|
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
|
||||||
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
||||||
swDisableTracking = view.findViewById(R.id.swDisableTracking);
|
swDisableTracking = view.findViewById(R.id.swDisableTracking);
|
||||||
|
|
||||||
setOptions();
|
setOptions();
|
||||||
|
@ -186,13 +184,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
||||||
@Override
|
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
||||||
prefs.edit().putBoolean("authentication", checked).apply();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
swDisableTracking.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swDisableTracking.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -268,7 +259,6 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
||||||
swAutoRead.setChecked(prefs.getBoolean("autoread", false));
|
swAutoRead.setChecked(prefs.getBoolean("autoread", false));
|
||||||
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
|
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
|
||||||
swDiscardDelete.setChecked(prefs.getBoolean("discard_delete", false));
|
swDiscardDelete.setChecked(prefs.getBoolean("discard_delete", false));
|
||||||
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
||||||
swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true));
|
swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
private SwitchCompat swIdenticons;
|
private SwitchCompat swIdenticons;
|
||||||
private SwitchCompat swCircular;
|
private SwitchCompat swCircular;
|
||||||
private SwitchCompat swNameEmail;
|
private SwitchCompat swNameEmail;
|
||||||
|
private SwitchCompat swAuthentication;
|
||||||
private SwitchCompat swSubjectTop;
|
private SwitchCompat swSubjectTop;
|
||||||
private SwitchCompat swSubjectItalic;
|
private SwitchCompat swSubjectItalic;
|
||||||
private Spinner spSubjectEllipsize;
|
private Spinner spSubjectEllipsize;
|
||||||
|
@ -73,7 +74,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
|
|
||||||
private final static String[] RESET_OPTIONS = new String[]{
|
private final static String[] RESET_OPTIONS = new String[]{
|
||||||
"theme", "startup", "cards", "date", "threading", "highlight_unread",
|
"theme", "startup", "cards", "date", "threading", "highlight_unread",
|
||||||
"avatars", "generated_icons", "identicons", "circular", "name_email", "subject_top", "subject_italic", "subject_ellipsize",
|
"avatars", "generated_icons", "identicons", "circular", "name_email",
|
||||||
|
"authentication", "subject_top", "subject_italic", "subject_ellipsize",
|
||||||
"flags", "preview", "preview_italic", "addresses", "attachments_alt",
|
"flags", "preview", "preview_italic", "addresses", "attachments_alt",
|
||||||
"contrast", "monospaced", "inline_images", "collapse_quotes", "autocontent", "seekbar", "actionbar",
|
"contrast", "monospaced", "inline_images", "collapse_quotes", "autocontent", "seekbar", "actionbar",
|
||||||
};
|
};
|
||||||
|
@ -99,6 +101,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||||
swCircular = view.findViewById(R.id.swCircular);
|
swCircular = view.findViewById(R.id.swCircular);
|
||||||
swNameEmail = view.findViewById(R.id.swNameEmail);
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
||||||
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
||||||
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
||||||
swSubjectItalic = view.findViewById(R.id.swSubjectItalic);
|
swSubjectItalic = view.findViewById(R.id.swSubjectItalic);
|
||||||
spSubjectEllipsize = view.findViewById(R.id.spSubjectEllipsize);
|
spSubjectEllipsize = view.findViewById(R.id.spSubjectEllipsize);
|
||||||
|
@ -209,6 +212,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
prefs.edit().putBoolean("authentication", checked).apply();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
swSubjectTop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swSubjectTop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -385,6 +395,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
||||||
swCircular.setChecked(prefs.getBoolean("circular", true));
|
swCircular.setChecked(prefs.getBoolean("circular", true));
|
||||||
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
||||||
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
||||||
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
|
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
|
||||||
swSubjectItalic.setChecked(prefs.getBoolean("subject_italic", true));
|
swSubjectItalic.setChecked(prefs.getBoolean("subject_italic", true));
|
||||||
|
|
||||||
|
|
|
@ -202,30 +202,6 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/swAutoMove"
|
app:layout_constraintTop_toBottomOf="@id/swAutoMove"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/ivAuth"
|
|
||||||
android:layout_width="21dp"
|
|
||||||
android:layout_height="21dp"
|
|
||||||
android:contentDescription="@string/title_legend_auth"
|
|
||||||
android:tint="@color/colorError"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/swAuthentication"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/swAuthentication"
|
|
||||||
app:srcCompat="@drawable/baseline_flag_24" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
|
||||||
android:id="@+id/swAuthentication"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="6dp"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:checked="true"
|
|
||||||
android:text="@string/title_advanced_authentication"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/ivAuth"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/swDiscardDelete"
|
|
||||||
app:switchPadding="12dp" />
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swDisableTracking"
|
android:id="@+id/swDisableTracking"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -235,7 +211,7 @@
|
||||||
android:text="@string/title_advanced_tracking"
|
android:text="@string/title_advanced_tracking"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swAuthentication"
|
app:layout_constraintTop_toBottomOf="@id/swDiscardDelete"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -181,6 +181,30 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/swNameEmail" />
|
app:layout_constraintTop_toBottomOf="@id/swNameEmail" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/ivAuth"
|
||||||
|
android:layout_width="21dp"
|
||||||
|
android:layout_height="21dp"
|
||||||
|
android:contentDescription="@string/title_legend_auth"
|
||||||
|
android:tint="@color/colorError"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/swAuthentication"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/swAuthentication"
|
||||||
|
app:srcCompat="@drawable/baseline_flag_24" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/swAuthentication"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="6dp"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/title_advanced_authentication"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/ivAuth"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvNameEmailHint"
|
||||||
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swSubjectTop"
|
android:id="@+id/swSubjectTop"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -190,7 +214,7 @@
|
||||||
android:text="@string/title_advanced_subject_top"
|
android:text="@string/title_advanced_subject_top"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvNameEmailHint"
|
app:layout_constraintTop_toBottomOf="@id/swAuthentication"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
|
|
@ -241,6 +241,7 @@
|
||||||
<string name="title_advanced_identicons">Show identicons</string>
|
<string name="title_advanced_identicons">Show identicons</string>
|
||||||
<string name="title_advanced_circular">Show round icons</string>
|
<string name="title_advanced_circular">Show round icons</string>
|
||||||
<string name="title_advanced_name_email">Show names and email addresses</string>
|
<string name="title_advanced_name_email">Show names and email addresses</string>
|
||||||
|
<string name="title_advanced_authentication">Show a warning when the receiving server could not authenticate the message</string>
|
||||||
<string name="title_advanced_subject_top">Show subject above sender</string>
|
<string name="title_advanced_subject_top">Show subject above sender</string>
|
||||||
<string name="title_advanced_subject_italic">Show subject in italics</string>
|
<string name="title_advanced_subject_italic">Show subject in italics</string>
|
||||||
<string name="title_advanced_subject_elipsed">When needed, shorten the subject</string>
|
<string name="title_advanced_subject_elipsed">When needed, shorten the subject</string>
|
||||||
|
@ -269,7 +270,6 @@
|
||||||
<string name="title_advanced_autoread">Automatically mark messages read on moving messages</string>
|
<string name="title_advanced_autoread">Automatically mark messages read on moving messages</string>
|
||||||
<string name="title_advanced_automove">Confirm moving messages</string>
|
<string name="title_advanced_automove">Confirm moving messages</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_authentication">Show a warning when the receiving server could not authenticate the message</string>
|
|
||||||
<string name="title_advanced_tracking">Automatically recognize and disable tracking images</string>
|
<string name="title_advanced_tracking">Automatically recognize and disable tracking images</string>
|
||||||
|
|
||||||
<string name="title_advanced_badge">Show launcher icon with number of new messages</string>
|
<string name="title_advanced_badge">Show launcher icon with number of new messages</string>
|
||||||
|
|
Loading…
Reference in New Issue