Get user name type

This commit is contained in:
M66B
2018-12-29 17:23:27 +00:00
parent 3d74b93d74
commit ef2172f7fb
2 changed files with 30 additions and 14 deletions

View File

@@ -222,10 +222,10 @@ public class FragmentSetup extends FragmentEx {
if (!Patterns.EMAIL_ADDRESS.matcher(email).matches())
throw new IllegalArgumentException(context.getString(R.string.title_email_invalid));
String domain = email.split("@")[1];
Provider provider = Provider.fromDomain(context, domain);
String[] dparts = email.split("@");
Provider provider = Provider.fromDomain(context, dparts[1]);
String user = email; // TODO
String user = (provider.user == Provider.UserType.EMAIL ? email : dparts[0]);
Character separator;
long now = new Date().getTime();