Fixed collation

This commit is contained in:
M66B 2019-04-24 11:59:28 +02:00
parent 3fdba49f88
commit 856d04d79e
3 changed files with 3 additions and 9 deletions

View File

@ -1376,7 +1376,7 @@ class Core {
String email = ((InternetAddress) reply).getAddress();
String canonical = Helper.canonicalAddress(email);
if (!TextUtils.isEmpty(email) &&
db.identity().getIdentity(folder.account, email.toLowerCase()) == null &&
db.identity().getIdentity(folder.account, email) == null &&
(canonical.equals(email) ||
db.identity().getIdentity(folder.account, canonical) == null)) {
me = false;
@ -1388,7 +1388,7 @@ class Core {
}
for (Address recipient : recipients) {
String email = ((InternetAddress) recipient).getAddress().toLowerCase();
String email = ((InternetAddress) recipient).getAddress();
String name = ((InternetAddress) recipient).getPersonal();
Uri avatar = ContactInfo.getLookupUri(context, new Address[]{recipient});
EntityContact contact = db.contact().getContact(folder.account, type, email);

View File

@ -55,7 +55,7 @@ public interface DaoContact {
" FROM contact" +
" WHERE account = :account" +
" AND type = :type" +
" AND email = :email")
" AND email = :email COLLATE NOCASE")
EntityContact getContact(long account, int type, String email);
@Query("SELECT id AS _id, name, email" +

View File

@ -586,8 +586,6 @@ public class FragmentIdentity extends FragmentBase {
if (synchronize && TextUtils.isEmpty(password) && !insecure)
throw new IllegalArgumentException(context.getString(R.string.title_no_password));
email = email.toLowerCase();
if (TextUtils.isEmpty(display))
display = null;
@ -596,13 +594,9 @@ public class FragmentIdentity extends FragmentBase {
if (TextUtils.isEmpty(replyto))
replyto = null;
else
replyto = replyto.toLowerCase();
if (TextUtils.isEmpty(bcc))
bcc = null;
else
bcc = bcc.toLowerCase();
if (Color.TRANSPARENT == color)
color = null;