Added junk learn remark

pull/205/head
M66B 3 years ago
parent 3f447cba87
commit 0b81b86cc6

@ -8778,6 +8778,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
TextView tvSourceFolders = dview.findViewById(R.id.tvSourceFolders);
TextView tvTargetFolders = dview.findViewById(R.id.tvTargetFolders);
CheckBox cbNotAgain = dview.findViewById(R.id.cbNotAgain);
TextView tvJunkLearn = dview.findViewById(R.id.tvJunkLearn);
String question = context.getResources()
.getQuantityString(R.plurals.title_moving_messages,
@ -8791,6 +8792,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
List<String> targets = new ArrayList<>();
Integer sourceColor = null;
Integer targetColor = null;
boolean junk = false;
for (MessageTarget t : result) {
if (!sources.contains(t.sourceFolder.type))
sources.add(t.sourceFolder.type);
@ -8800,6 +8802,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
sourceColor = t.sourceFolder.color;
if (targetColor == null)
targetColor = t.targetFolder.color;
if (!junk &&
(EntityFolder.JUNK.equals(t.sourceFolder.type) ||
EntityFolder.JUNK.equals(t.targetFolder.type)))
junk = true;
}
Drawable source = null;
@ -8844,6 +8850,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}
});
tvJunkLearn.setVisibility(junk ? View.VISIBLE : View.GONE);
return new AlertDialog.Builder(context)
.setView(dview)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {

@ -44,11 +44,11 @@
android:layout_height="48dp"
android:layout_marginTop="12dp"
android:gravity="center"
app:tint="?android:attr/textColorSecondary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSourceFolders"
app:srcCompat="@drawable/baseline_arrow_downward_24" />
app:srcCompat="@drawable/baseline_arrow_downward_24"
app:tint="?android:attr/textColorSecondary" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvTargetFolders"
@ -77,5 +77,17 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvTargetFolders" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvJunkLearn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/title_hint_junk_learn"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cbNotAgain" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>

@ -1579,6 +1579,7 @@
<string name="title_hint_reformat">By default, FairEmail reformats messages for privacy and security reasons. To view the original message, tap the \'full screen\' icon above the message text.</string>
<string name="title_hint_design">The design is intentionally not distracting, but kept highly functional. There are many options to customize the appearance, but please understand that it is impossible to make everybody completely happy at the same time.</string>
<string name="title_hint_junk">Spam filtering should be done by the email server and cannot be done reliably on a battery powered device with limited capabilities.</string>
<string name="title_hint_junk_learn">By moving messages to and from the spam folder, the email server "learns" what spam is</string>
<string name="title_hint_contact_actions">Long press for options</string>
<string name="title_hint_eml">This is a summary of the content of a raw message file. Save the raw message with the save icon in the action bar to view all content.</string>

Loading…
Cancel
Save