mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Square identicons
This commit is contained in:
@@ -161,15 +161,17 @@ public class ContactInfo {
|
||||
}
|
||||
}
|
||||
|
||||
boolean identicon = false;
|
||||
if (info.bitmap == null) {
|
||||
int dp = Helper.dp2pixels(context, 48);
|
||||
boolean dark = Helper.isDarkTheme(context);
|
||||
boolean generated = prefs.getBoolean("generated_icons", true);
|
||||
if (generated) {
|
||||
boolean identicons = prefs.getBoolean("identicons", false);
|
||||
if (identicons)
|
||||
if (identicons) {
|
||||
identicon = true;
|
||||
info.bitmap = Identicon.icon(key, dp, 5, dark);
|
||||
else
|
||||
} else
|
||||
info.bitmap = Identicon.letter(key, dp, dark);
|
||||
}
|
||||
}
|
||||
@@ -198,7 +200,7 @@ public class ContactInfo {
|
||||
paint.setAntiAlias(true);
|
||||
canvas.drawARGB(0, 0, 0, 0);
|
||||
paint.setColor(Color.GRAY);
|
||||
if (circular)
|
||||
if (circular && !identicon)
|
||||
canvas.drawOval(new RectF(dest), paint);
|
||||
else {
|
||||
float radius = Helper.dp2pixels(context, 3);
|
||||
|
||||
Reference in New Issue
Block a user