mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 02:07:12 +00:00
Debug plain settings files
This commit is contained in:
parent
0dd715c117
commit
0bba2154bf
2 changed files with 12 additions and 15 deletions
|
@ -1679,7 +1679,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
String password1 = etPassword1.getEditText().getText().toString();
|
String password1 = etPassword1.getEditText().getText().toString();
|
||||||
String password2 = etPassword2.getEditText().getText().toString();
|
String password2 = etPassword2.getEditText().getText().toString();
|
||||||
|
|
||||||
if (TextUtils.isEmpty(password1) && !BuildConfig.DEBUG)
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean debug = prefs.getBoolean("debug", false);
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(password1) && !(debug || BuildConfig.DEBUG))
|
||||||
ToastEx.makeText(context, R.string.title_setup_password_missing, Toast.LENGTH_LONG).show();
|
ToastEx.makeText(context, R.string.title_setup_password_missing, Toast.LENGTH_LONG).show();
|
||||||
else {
|
else {
|
||||||
if (password1.equals(password2)) {
|
if (password1.equals(password2)) {
|
||||||
|
@ -1739,7 +1742,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
String password1 = etPassword1.getEditText().getText().toString();
|
String password1 = etPassword1.getEditText().getText().toString();
|
||||||
|
|
||||||
if (TextUtils.isEmpty(password1) && !BuildConfig.DEBUG)
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean debug = prefs.getBoolean("debug", false);
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(password1) && !(debug || BuildConfig.DEBUG))
|
||||||
ToastEx.makeText(context, R.string.title_setup_password_missing, Toast.LENGTH_LONG).show();
|
ToastEx.makeText(context, R.string.title_setup_password_missing, Toast.LENGTH_LONG).show();
|
||||||
else {
|
else {
|
||||||
ActivitySetup activity = (ActivitySetup) getActivity();
|
ActivitySetup activity = (ActivitySetup) getActivity();
|
||||||
|
|
|
@ -659,8 +659,11 @@
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
<eu.faircode.email.FixedTextView
|
||||||
android:id="@+id/tvCaptionChecks"
|
android:id="@+id/tvCaptionChecks"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:drawableStart="@drawable/twotone_flag_24"
|
||||||
|
android:drawablePadding="6dp"
|
||||||
|
android:drawableTint="?attr/colorWarning"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/title_advanced_caption_checks"
|
android:text="@string/title_advanced_caption_checks"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
android:textAppearance="@style/TextAppearance.AppCompat.Large"
|
||||||
|
@ -674,9 +677,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:drawableStart="@drawable/twotone_flag_24"
|
|
||||||
android:drawablePadding="6dp"
|
|
||||||
android:drawableTint="?attr/colorWarning"
|
|
||||||
android:text="@string/title_advanced_check_authentication"
|
android:text="@string/title_advanced_check_authentication"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -701,9 +701,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:checked="true"
|
android:checked="true"
|
||||||
android:drawableStart="@drawable/twotone_flag_24"
|
|
||||||
android:drawablePadding="6dp"
|
|
||||||
android:drawableTint="?attr/colorWarning"
|
|
||||||
android:text="@string/title_advanced_check_reply_domain"
|
android:text="@string/title_advanced_check_reply_domain"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -727,9 +724,6 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:drawableStart="@drawable/twotone_flag_24"
|
|
||||||
android:drawablePadding="6dp"
|
|
||||||
android:drawableTint="?attr/colorWarning"
|
|
||||||
android:text="@string/title_advanced_check_mx"
|
android:text="@string/title_advanced_check_mx"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -766,9 +760,6 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:drawableStart="@drawable/twotone_flag_24"
|
|
||||||
android:drawablePadding="6dp"
|
|
||||||
android:drawableTint="?attr/colorWarning"
|
|
||||||
android:text="@string/title_advanced_check_blocklist"
|
android:text="@string/title_advanced_check_blocklist"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
Loading…
Reference in a new issue