From 9c5baa33ae1858a5542c2427518624da00b39ed2 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 29 Jun 2021 17:54:05 +0200 Subject: [PATCH] Enable Gravatars again --- app/src/main/java/eu/faircode/email/ContactInfo.java | 6 +++++- .../main/java/eu/faircode/email/FragmentOptionsDisplay.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index bb4346be19..79e27e25d6 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -155,6 +155,10 @@ public class ContactInfo { return (new Date().getTime() - time > CACHE_CONTACT_DURATION); } + static boolean canGravatars() { + return true; + } + static void cleanup(Context context) { long now = new Date().getTime(); @@ -289,7 +293,7 @@ public class ContactInfo { } // Gravatar - if (info.bitmap == null && gravatars && !BuildConfig.PLAY_STORE_RELEASE) { + if (info.bitmap == null && gravatars && canGravatars()) { if (!TextUtils.isEmpty(info.email)) { String gkey = info.email.toLowerCase(Locale.ROOT); boolean lookup; diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java index 8a587b2ba2..82a70b54ad 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java @@ -885,7 +885,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer // Initialize FragmentDialogTheme.setBackground(getContext(), view, false); - grpGravatars.setVisibility(BuildConfig.PLAY_STORE_RELEASE ? View.GONE : View.VISIBLE); + grpGravatars.setVisibility(ContactInfo.canGravatars() ? View.VISIBLE : View.GONE); PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);