Added email provider description

pull/199/head
M66B 3 years ago
parent 6371d870a8
commit f42ebd00ec

@ -53,6 +53,7 @@ import java.util.concurrent.Future;
public class EmailProvider { public class EmailProvider {
public String id; public String id;
public String name; public String name;
public String description;
public boolean enabled; public boolean enabled;
public List<String> domain; public List<String> domain;
public int order; public int order;
@ -131,6 +132,9 @@ public class EmailProvider {
provider = new EmailProvider(); provider = new EmailProvider();
provider.id = xml.getAttributeValue(null, "id"); provider.id = xml.getAttributeValue(null, "id");
provider.name = xml.getAttributeValue(null, "name"); provider.name = xml.getAttributeValue(null, "name");
provider.description = xml.getAttributeValue(null, "description");
if (provider.description == null)
provider.description = name;
provider.enabled = xml.getAttributeBooleanValue(null, "enabled", true); provider.enabled = xml.getAttributeBooleanValue(null, "enabled", true);
String domain = xml.getAttributeValue(null, "domain"); String domain = xml.getAttributeValue(null, "domain");
if (domain != null) if (domain != null)

@ -191,10 +191,10 @@ public class FragmentSetup extends FragmentBase {
if (provider.oauth != null && if (provider.oauth != null &&
(provider.oauth.enabled || BuildConfig.DEBUG)) { (provider.oauth.enabled || BuildConfig.DEBUG)) {
MenuItem item = menu MenuItem item = menu
.add(Menu.NONE, -1, order++, getString(R.string.title_setup_oauth, provider.name)) .add(Menu.NONE, -1, order++, getString(R.string.title_setup_oauth, provider.description))
.setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH) .setIntent(new Intent(ActivitySetup.ACTION_QUICK_OAUTH)
.putExtra("id", provider.id) .putExtra("id", provider.id)
.putExtra("name", provider.name) .putExtra("name", provider.description)
.putExtra("askAccount", provider.oauth.askAccount)); .putExtra("askAccount", provider.oauth.askAccount));
int resid = context.getResources() int resid = context.getResources()
.getIdentifier("provider_" + provider.id, "drawable", context.getPackageName()); .getIdentifier("provider_" + provider.id, "drawable", context.getPackageName());

@ -77,7 +77,8 @@
starttls="true" /> starttls="true" />
</provider> </provider>
<provider <provider
name="Outlook/Office 365" name="Outlook"
description="Outlook/Office 365"
id="office365" id="office365"
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14" link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
order="5" order="5"

Loading…
Cancel
Save