Added POP3 to quick setup menu

pull/190/head
M66B 4 years ago
parent 2e4ab435d2
commit a801e8fe10

@ -127,6 +127,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
static final String ACTION_QUICK_GMAIL = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_GMAIL";
static final String ACTION_QUICK_OAUTH = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_OAUTH";
static final String ACTION_QUICK_SETUP = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_SETUP";
static final String ACTION_QUICK_POP3 = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_POP3";
static final String ACTION_VIEW_ACCOUNTS = BuildConfig.APPLICATION_ID + ".ACTION_VIEW_ACCOUNTS";
static final String ACTION_VIEW_IDENTITIES = BuildConfig.APPLICATION_ID + ".ACTION_VIEW_IDENTITIES";
static final String ACTION_EDIT_ACCOUNT = BuildConfig.APPLICATION_ID + ".EDIT_ACCOUNT";
@ -320,6 +321,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
iff.addAction(ACTION_QUICK_GMAIL);
iff.addAction(ACTION_QUICK_OAUTH);
iff.addAction(ACTION_QUICK_SETUP);
iff.addAction(ACTION_QUICK_POP3);
iff.addAction(ACTION_VIEW_ACCOUNTS);
iff.addAction(ACTION_VIEW_IDENTITIES);
iff.addAction(ACTION_EDIT_ACCOUNT);
@ -1159,12 +1161,20 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
fragmentTransaction.commit();
}
private void onViewQuickSetup(Intent intent) {
private void onQuickSetup(Intent intent) {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentQuickSetup()).addToBackStack("quick");
fragmentTransaction.commit();
}
private void onQuickPop3(Intent intent) {
FragmentBase fragment = new FragmentPop();
fragment.setArguments(new Bundle());
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("account");
fragmentTransaction.commit();
}
private void onViewAccounts(Intent intent) {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentAccounts()).addToBackStack("accounts");
@ -1321,7 +1331,9 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
else if (ACTION_QUICK_OAUTH.equals(action))
onOAuth(intent);
else if (ACTION_QUICK_SETUP.equals(action))
onViewQuickSetup(intent);
onQuickSetup(intent);
else if (ACTION_QUICK_POP3.equals(action))
onQuickPop3(intent);
else if (ACTION_VIEW_ACCOUNTS.equals(action))
onViewAccounts(intent);
else if (ACTION_VIEW_IDENTITIES.equals(action))

@ -182,6 +182,7 @@ public class FragmentSetup extends FragmentBase {
//popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_activesync, order++, R.string.title_setup_activesync);
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other);
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_pop3, order++, R.string.title_setup_pop3);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
@ -201,6 +202,9 @@ public class FragmentSetup extends FragmentBase {
case R.string.title_setup_other:
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_SETUP));
return true;
case R.string.title_setup_pop3:
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_POP3));
return true;
default:
if (item.getIntent() == null)
return false;

@ -175,6 +175,7 @@
<string name="title_setup_oauth_permission">The email provider has approved OAuth only for official app versions</string>
<string name="title_setup_activesync" translatable="false">Exchange ActiveSync</string>
<string name="title_setup_other">Other provider</string>
<string name="title_setup_pop3">POP3 account</string>
<string name="title_setup_gmail_support">Authorizing Google accounts will work in official versions only because Android checks the app signature</string>
<string name="title_setup_gmail_rationale">Please grant permissions to select an account and read your name</string>
<string name="title_setup_gmail_permissions">Google will ask for permissions to read, compose, send and permanently delete all your email. FairEmail will never delete your messages without your explicit consent.</string>

Loading…
Cancel
Save