mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Fix contact picture color generation.
Make sure to return different colors for senders with different name, but the same mail address (e.g. mails sent by certain issue tracking systems).
This commit is contained in:
parent
0eb24512b0
commit
b500047e42
@ -161,7 +161,7 @@ public class ContactPictureLoader {
|
||||
return mDefaultBackgroundColor;
|
||||
}
|
||||
|
||||
int val = address.getAddress().toLowerCase(Locale.getDefault()).hashCode();
|
||||
int val = address.hashCode();
|
||||
int rgb = CONTACT_DUMMY_COLORS_ARGB[Math.abs(val) % CONTACT_DUMMY_COLORS_ARGB.length];
|
||||
return rgb;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user