Enable Gravatars again

This commit is contained in:
M66B 2021-06-29 17:54:05 +02:00
parent 3bfd4898fd
commit 9c5baa33ae
2 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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);