diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 46381f6f7d..2a032e8ce9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -259,6 +259,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. private ImageButton ibHintSupport; private ImageButton ibHintSwipe; private ImageButton ibHintSelect; + private ImageButton ibHintJunk; private TextView tvNoEmail; private TextView tvNoEmailHint; private FixedRecyclerView rvMessage; @@ -279,6 +280,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. private Group grpHintSupport; private Group grpHintSwipe; private Group grpHintSelect; + private Group grpHintJunk; private Group grpReady; private Group grpOutbox; private FloatingActionButton fabReply; @@ -512,6 +514,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. ibHintSupport = view.findViewById(R.id.ibHintSupport); ibHintSwipe = view.findViewById(R.id.ibHintSwipe); ibHintSelect = view.findViewById(R.id.ibHintSelect); + ibHintJunk = view.findViewById(R.id.ibHintJunk); tvNoEmail = view.findViewById(R.id.tvNoEmail); tvNoEmailHint = view.findViewById(R.id.tvNoEmailHint); rvMessage = view.findViewById(R.id.rvMessage); @@ -533,6 +536,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. grpHintSupport = view.findViewById(R.id.grpHintSupport); grpHintSwipe = view.findViewById(R.id.grpHintSwipe); grpHintSelect = view.findViewById(R.id.grpHintSelect); + grpHintJunk = view.findViewById(R.id.grpHintJunk); grpReady = view.findViewById(R.id.grpReady); grpOutbox = view.findViewById(R.id.grpOutbox); @@ -591,6 +595,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } }); + ibHintJunk.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + prefs.edit().putBoolean("message_junk", true).apply(); + grpHintJunk.setVisibility(View.GONE); + } + }); + rvMessage.setHasFixedSize(false); int threads = prefs.getInt("query_threads", DB.DEFAULT_QUERY_THREADS); @@ -4205,15 +4217,19 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } boolean hints = (viewType == AdapterMessage.ViewType.UNIFIED || viewType == AdapterMessage.ViewType.FOLDER); + boolean junk = EntityFolder.JUNK.equals(type); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); boolean app_support = prefs.getBoolean("app_support", false); boolean message_swipe = prefs.getBoolean("message_swipe", false); boolean message_select = prefs.getBoolean("message_select", false); + boolean message_junk = prefs.getBoolean("message_junk", false); boolean send_pending = prefs.getBoolean("send_pending", true); - grpHintSupport.setVisibility(app_support || !hints ? View.GONE : View.VISIBLE); - grpHintSwipe.setVisibility(message_swipe || !hints ? View.GONE : View.VISIBLE); - grpHintSelect.setVisibility(message_select || !hints ? View.GONE : View.VISIBLE); + grpHintSupport.setVisibility(app_support || !hints || junk ? View.GONE : View.VISIBLE); + grpHintSwipe.setVisibility(message_swipe || !hints || junk ? View.GONE : View.VISIBLE); + grpHintSelect.setVisibility(message_select || !hints || junk ? View.GONE : View.VISIBLE); + grpHintJunk.setVisibility(message_junk || !junk ? View.GONE : View.VISIBLE); final DB db = DB.getInstance(getContext()); diff --git a/app/src/main/java/eu/faircode/email/FragmentOptions.java b/app/src/main/java/eu/faircode/email/FragmentOptions.java index c78f60d046..2b408cbaf7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptions.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptions.java @@ -127,7 +127,9 @@ public class FragmentOptions extends FragmentBase { )); static String[] OPTIONS_RESTART = new String[]{ - "first", "app_support", "notify_archive", "message_swipe", "message_select", "folder_actions", "folder_sync", + "first", "app_support", "notify_archive", + "message_swipe", "message_select", "message_junk", + "folder_actions", "folder_sync", "subscriptions", "check_authentication", "check_tls", "check_reply_domain", "check_mx", "check_blocklist", "send_pending", diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java index f8d47740fe..0a6f0b9c39 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsMisc.java @@ -215,7 +215,9 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc }; private final static String[] RESET_QUESTIONS = new String[]{ - "first", "app_support", "notify_archive", "message_swipe", "message_select", "folder_actions", "folder_sync", + "first", "app_support", "notify_archive", + "message_swipe", "message_select", "message_junk", + "folder_actions", "folder_sync", "crash_reports_asked", "review_asked", "review_later", "why", "reply_hint", "html_always_images", "open_full_confirmed", "open_amp_confirmed", "ask_images", "ask_html", diff --git a/app/src/main/res/layout/fragment_messages.xml b/app/src/main/res/layout/fragment_messages.xml index 61e790d8bd..6a3ff977d7 100644 --- a/app/src/main/res/layout/fragment_messages.xml +++ b/app/src/main/res/layout/fragment_messages.xml @@ -135,6 +135,39 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvHintSelect" /> + + + + + + + app:layout_constraintTop_toBottomOf="@id/vSeparatorHintJunk" /> + + If you have a question or a problem, please use the support menu to get help Swipe left to trash; Swipe right to archive (if available); The swipe actions can be configured in the account settings Long press a message to start selecting multiple messages; Hold and swipe up or down to select more messages + These messages are in the spam folder of the email server. Obviously, the app cannot prevent spam messages from being sent to you. Important Downloading messages can take some time, depending on the speed of the provider, internet connection, the device and on the number of messages. While downloading messages the app might respond slower. By default, not all messages will be downloaded to limit storage space and battery and data usage. You can change this by long pressing a folder in the folder list and selecting \'Synchronize more\'.