From 027b6638d51a9c96dca3c20f6fbda5478104a0c2 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 1 Jul 2020 08:11:28 +0200 Subject: [PATCH] Allow swipe/ask for POP3 accounts --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 6 ++++-- app/src/main/java/eu/faircode/email/FragmentPop.java | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 027b2712cf..2f7742a026 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -1913,8 +1913,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. popupMenu.getMenu().add(Menu.NONE, R.string.title_unhide, 4, R.string.title_unhide); popupMenu.getMenu().add(Menu.NONE, R.string.title_flag_color, 5, R.string.title_flag_color); - popupMenu.getMenu().add(Menu.NONE, R.string.title_move, 6, R.string.title_move); - popupMenu.getMenu().add(Menu.NONE, R.string.title_report_spam, 7, R.string.title_report_spam); + if (message.accountProtocol == EntityAccount.TYPE_IMAP) { + popupMenu.getMenu().add(Menu.NONE, R.string.title_move, 6, R.string.title_move); + popupMenu.getMenu().add(Menu.NONE, R.string.title_report_spam, 7, R.string.title_report_spam); + } popupMenu.getMenu().add(Menu.NONE, R.string.title_delete_permanently, 8, R.string.title_delete_permanently); popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { diff --git a/app/src/main/java/eu/faircode/email/FragmentPop.java b/app/src/main/java/eu/faircode/email/FragmentPop.java index d09c32ec7d..276ec43d96 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPop.java +++ b/app/src/main/java/eu/faircode/email/FragmentPop.java @@ -738,6 +738,11 @@ public class FragmentPop extends FragmentBase { private List getSwipeActions() { List folders = new ArrayList<>(); + EntityFolder ask = new EntityFolder(); + ask.id = FragmentAccount.SWIPE_ACTION_ASK; + ask.name = getString(R.string.title_ask_what); + folders.add(ask); + EntityFolder seen = new EntityFolder(); seen.id = FragmentAccount.SWIPE_ACTION_SEEN; seen.name = getString(R.string.title_seen);