POP3 support

This commit is contained in:
M66B
2019-09-19 17:41:26 +02:00
parent 70cce65e61
commit 0604a1b077
24 changed files with 1304 additions and 151 deletions

View File

@@ -192,7 +192,8 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast(
new Intent(settings ? ActivitySetup.ACTION_EDIT_ACCOUNT : ActivityView.ACTION_VIEW_FOLDERS)
.putExtra("id", account.id));
.putExtra("id", account.id)
.putExtra("pop", account.pop));
}
}
@@ -213,7 +214,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
popupMenu.getMenu().add(Menu.NONE, R.string.title_enabled, 1, R.string.title_enabled)
.setCheckable(true).setChecked(account.synchronize);
if (account.notify && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (!account.pop && account.notify && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
String channelId = EntityAccount.getNotificationChannelId(account.id);
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel channel = nm.getNotificationChannel(channelId);
@@ -221,7 +222,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_channel, 2, R.string.title_edit_channel);
}
if (settings)
if (!account.pop && settings)
popupMenu.getMenu().add(Menu.NONE, R.string.title_copy, 3, R.string.title_copy);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {