mirror of https://github.com/M66B/FairEmail.git
Enable Gravatars again
This commit is contained in:
parent
3bfd4898fd
commit
9c5baa33ae
|
@ -155,6 +155,10 @@ public class ContactInfo {
|
||||||
return (new Date().getTime() - time > CACHE_CONTACT_DURATION);
|
return (new Date().getTime() - time > CACHE_CONTACT_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean canGravatars() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static void cleanup(Context context) {
|
static void cleanup(Context context) {
|
||||||
long now = new Date().getTime();
|
long now = new Date().getTime();
|
||||||
|
|
||||||
|
@ -289,7 +293,7 @@ public class ContactInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gravatar
|
// Gravatar
|
||||||
if (info.bitmap == null && gravatars && !BuildConfig.PLAY_STORE_RELEASE) {
|
if (info.bitmap == null && gravatars && canGravatars()) {
|
||||||
if (!TextUtils.isEmpty(info.email)) {
|
if (!TextUtils.isEmpty(info.email)) {
|
||||||
String gkey = info.email.toLowerCase(Locale.ROOT);
|
String gkey = info.email.toLowerCase(Locale.ROOT);
|
||||||
boolean lookup;
|
boolean lookup;
|
||||||
|
|
|
@ -885,7 +885,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
FragmentDialogTheme.setBackground(getContext(), view, false);
|
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);
|
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue