mirror of https://github.com/M66B/FairEmail.git
Enable Gravatars and warn about privacy risks
This commit is contained in:
parent
c6f6f2298f
commit
81414b51b4
|
@ -170,7 +170,7 @@ public class ContactInfo {
|
|||
|
||||
if (info.bitmap == null) {
|
||||
boolean gravatars = prefs.getBoolean("gravatars", false);
|
||||
if (gravatars && BuildConfig.DEBUG) {
|
||||
if (gravatars) {
|
||||
boolean lookup;
|
||||
synchronized (emailGravatar) {
|
||||
Gravatar g = emailGravatar.get(address.getAddress());
|
||||
|
|
|
@ -41,6 +41,7 @@ import android.widget.ImageView;
|
|||
import android.widget.RadioGroup;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -62,6 +63,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
private SwitchCompat swHighlightUnread;
|
||||
private SwitchCompat swColorStripe;
|
||||
private SwitchCompat swAvatars;
|
||||
private TextView tvGravatarsHint;
|
||||
private SwitchCompat swGravatars;
|
||||
private SwitchCompat swGeneratedIcons;
|
||||
private SwitchCompat swIdenticons;
|
||||
|
@ -128,6 +130,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
swColorStripe = view.findViewById(R.id.swColorStripe);
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swGravatars = view.findViewById(R.id.swGravatars);
|
||||
tvGravatarsHint = view.findViewById(R.id.tvGravatarsHint);
|
||||
swGeneratedIcons = view.findViewById(R.id.swGeneratedIcons);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
swCircular = view.findViewById(R.id.swCircular);
|
||||
|
@ -261,6 +264,14 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
}
|
||||
});
|
||||
|
||||
tvGravatarsHint.getPaint().setUnderlineText(true);
|
||||
tvGravatarsHint.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Helper.view(getContext(), Uri.parse(Helper.GRAVATAR_PRIVACY_URI), true);
|
||||
}
|
||||
});
|
||||
|
||||
swGeneratedIcons.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
@ -599,7 +610,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
swColorStripe.setChecked(prefs.getBoolean("color_stripe", true));
|
||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||
swGravatars.setChecked(prefs.getBoolean("gravatars", false));
|
||||
swGravatars.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
||||
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
||||
swIdenticons.setChecked(prefs.getBoolean("identicons", false));
|
||||
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
||||
|
|
|
@ -139,6 +139,7 @@ public class Helper {
|
|||
static final String SUPPORT_URI = "https://contact.faircode.eu/?product=fairemailsupport";
|
||||
static final String TEST_URI = "https://play.google.com/apps/testing/" + BuildConfig.APPLICATION_ID;
|
||||
static final String CROWDIN_URI = "https://crowdin.com/project/open-source-email";
|
||||
static final String GRAVATAR_PRIVACY_URI = "https://meta.stackexchange.com/questions/44717/is-gravatar-a-privacy-risk";
|
||||
|
||||
static ExecutorService getBackgroundExecutor(int threads, String name) {
|
||||
ThreadFactory factory = new ThreadFactory() {
|
||||
|
|
|
@ -202,6 +202,18 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/swAvatars"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvGravatarsHint"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:text="@string/title_advanced_gravatars_hint"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?android:attr/textColorLink"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swGravatars" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swGeneratedIcons"
|
||||
android:layout_width="0dp"
|
||||
|
@ -211,7 +223,7 @@
|
|||
android:text="@string/title_advanced_generated_icons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swGravatars"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvGravatarsHint"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
|
|
|
@ -428,6 +428,7 @@
|
|||
<string name="title_advanced_layout_hint">Switching to a more compact layout and changing the message text size can be done in the top action bar menu in the message view</string>
|
||||
<string name="title_advanced_date_hint">Messages are only grouped by date if they are sorted by time</string>
|
||||
<string name="title_advanced_threading_hint">Group messages related to each other</string>
|
||||
<string name="title_advanced_gravatars_hint">There might be a privacy risk</string>
|
||||
<string name="title_advanced_name_email_hint">When disabled only names will be shown when available</string>
|
||||
<string name="title_advanced_preview_hint">Only available when message text has been downloaded</string>
|
||||
<string name="title_advanced_inline_hint">Inline images are images included in the message</string>
|
||||
|
|
Loading…
Reference in New Issue