1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

Prevent resetting avatars

This can happen when revoking contacts permissions
This commit is contained in:
M66B 2020-04-15 20:26:04 +02:00
parent f1e9b23a96
commit a3b64e796e

View file

@ -2522,11 +2522,13 @@ class Core {
}
Uri uri = ContactInfo.getLookupUri(context, message.from);
String avatar = (uri == null ? null : uri.toString());
if (!Objects.equals(message.avatar, avatar)) {
update = true;
message.avatar = avatar;
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " avatar=" + avatar);
if (uri != null) {
String avatar = uri.toString();
if (!Objects.equals(message.avatar, avatar)) {
update = true;
message.avatar = avatar;
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " avatar=" + avatar);
}
}
if (update || process)