Removed check reply setting

This commit is contained in:
M66B 2020-12-24 08:38:15 +01:00
parent 4cf74900fa
commit a9ab876525
4 changed files with 15 additions and 53 deletions

View File

@ -2867,6 +2867,19 @@ class Core {
if (message.avatar == null && notify_known && pro)
message.ui_ignored = true;
// For contact forms
boolean self = false;
if (identity != null && message.from != null)
for (Address from : message.from)
if (identity.sameAddress(from) || identity.similarAddress(from)) {
self = true;
break;
}
if (!self) {
String warning = message.checkReplyDomain(context);
message.reply_domain = (warning == null);
}
boolean check_mx = prefs.getBoolean("check_mx", false);
if (check_mx)
try {
@ -2882,22 +2895,6 @@ class Core {
message.warning = Log.formatThrowable(ex, false);
}
boolean check_reply = prefs.getBoolean("check_reply", false);
if (check_reply) {
// For contact forms
boolean self = false;
if (identity != null && message.from != null)
for (Address from : message.from)
if (identity.sameAddress(from) || identity.similarAddress(from)) {
self = true;
break;
}
if (!self) {
String warning = message.checkReplyDomain(context);
message.reply_domain = (warning == null);
}
}
boolean check_spam = prefs.getBoolean("check_spam", false);
if (check_spam) {
String host = helper.getReceivedFromHost();

View File

@ -83,7 +83,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
private SwitchCompat swSubscriptions;
private SwitchCompat swSyncSubscribed;
private SwitchCompat swCheckMx;
private SwitchCompat swCheckReply;
private SwitchCompat swTuneKeepAlive;
private Group grpExempted;
@ -93,7 +92,7 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
"enabled", "poll_interval", "auto_optimize", "schedule", "schedule_start", "schedule_end",
"sync_nodate", "sync_unseen", "sync_flagged", "delete_unseen", "sync_kept", "gmail_thread_id",
"sync_folders", "sync_shared_folders", "subscriptions", "sync_subscribed",
"check_mx", "check_reply", "tune_keep_alive"
"check_mx", "tune_keep_alive"
};
@Override
@ -138,7 +137,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
swSubscriptions = view.findViewById(R.id.swSubscriptions);
swSyncSubscribed = view.findViewById(R.id.swSyncSubscribed);
swCheckMx = view.findViewById(R.id.swCheckMx);
swCheckReply = view.findViewById(R.id.swCheckReply);
swTuneKeepAlive = view.findViewById(R.id.swTuneKeepAlive);
grpExempted = view.findViewById(R.id.grpExempted);
@ -328,13 +326,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
}
});
swCheckReply.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("check_reply", checked).apply();
}
});
swTuneKeepAlive.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@ -433,7 +424,6 @@ public class FragmentOptionsSynchronize extends FragmentBase implements SharedPr
swSyncSubscribed.setChecked(prefs.getBoolean("sync_subscribed", false));
swSyncSubscribed.setEnabled(swSubscriptions.isChecked());
swCheckMx.setChecked(prefs.getBoolean("check_mx", false));
swCheckReply.setChecked(prefs.getBoolean("check_reply", false));
swTuneKeepAlive.setChecked(prefs.getBoolean("tune_keep_alive", true));
}

View File

@ -525,29 +525,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCheckMxHint" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swCheckReply"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_advanced_check_reply"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvDelayHint"
app:switchPadding="12dp" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvCheckReplyHint"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="48dp"
android:text="@string/title_advanced_check_reply_hint"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swCheckReply" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/swTuneKeepAlive"
android:layout_width="0dp"
@ -557,7 +534,7 @@
android:text="@string/title_advanced_tune_keep_alive"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvCheckReplyHint"
app:layout_constraintTop_toBottomOf="@id/tvDelayHint"
app:switchPadding="12dp" />
<androidx.constraintlayout.widget.Group

View File

@ -302,7 +302,6 @@
<string name="title_advanced_subscriptions">Manage folder subscriptions</string>
<string name="title_advanced_sync_subscribed">Automatically synchronize subscribed folders</string>
<string name="title_advanced_check_mx">Check sender email addresses on synchronizing messages</string>
<string name="title_advanced_check_reply">Check reply email addresses on synchronizing messages</string>
<string name="title_advanced_tune_keep_alive">Automatically tune the keep-alive interval</string>
<string name="title_advanced_keyboard">Show keyboard by default</string>
@ -553,7 +552,6 @@
<string name="title_advanced_sync_folders_hint">Disabling this will reduce data and battery usage somewhat, but will disable updating the list of folders too</string>
<string name="title_advanced_lookup_mx_hint">This will check if DNS MX records exist</string>
<string name="title_advanced_sync_delay_hint">This will slow down synchronizing messages</string>
<string name="title_advanced_check_reply_hint">This will check if domain name of the sender and reply addresses are the same</string>
<string name="title_advanced_suggest_local_hint">In addition to contacts provided by Android. Contact data will be stored for newly sent or received messages only when enabled.</string>
<string name="title_advanced_usenet_hint">Insert \'-- \' between the text and the signature</string>