mirror of https://github.com/M66B/FairEmail.git
Disabled Gravatars
This commit is contained in:
parent
9419ca1e4a
commit
6522f18110
|
@ -168,11 +168,11 @@ public class ContactInfo {
|
||||||
|
|
||||||
if (info.bitmap == null) {
|
if (info.bitmap == null) {
|
||||||
boolean gravatars = prefs.getBoolean("gravatars", false);
|
boolean gravatars = prefs.getBoolean("gravatars", false);
|
||||||
if (gravatars) {
|
if (gravatars && BuildConfig.DEBUG) {
|
||||||
HttpURLConnection urlConnection = null;
|
HttpURLConnection urlConnection = null;
|
||||||
try {
|
try {
|
||||||
String hash = Helper.md5(address.getAddress().getBytes());
|
String hash = Helper.md5(address.getAddress().getBytes());
|
||||||
URL url = new URL("https://www.gravatar.com/avatar/" + hash+"?d=404");
|
URL url = new URL("https://www.gravatar.com/avatar/" + hash + "?d=404");
|
||||||
|
|
||||||
urlConnection = (HttpURLConnection) url.openConnection();
|
urlConnection = (HttpURLConnection) url.openConnection();
|
||||||
urlConnection.setRequestMethod("GET");
|
urlConnection.setRequestMethod("GET");
|
||||||
|
|
|
@ -599,6 +599,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
swColorStripe.setChecked(prefs.getBoolean("color_stripe", true));
|
swColorStripe.setChecked(prefs.getBoolean("color_stripe", true));
|
||||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||||
swGravatars.setChecked(prefs.getBoolean("gravatars", false));
|
swGravatars.setChecked(prefs.getBoolean("gravatars", false));
|
||||||
|
swGravatars.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||||
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
||||||
swIdenticons.setChecked(prefs.getBoolean("identicons", false));
|
swIdenticons.setChecked(prefs.getBoolean("identicons", false));
|
||||||
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
||||||
|
|
Loading…
Reference in New Issue