mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Diabled favicons in Play store version
This commit is contained in:
parent
94c017e44c
commit
11ee258a3f
4 changed files with 23 additions and 5 deletions
|
@ -256,7 +256,7 @@ public class ContactInfo {
|
|||
boolean avatars = prefs.getBoolean("avatars", true);
|
||||
boolean bimi = prefs.getBoolean("bimi", false);
|
||||
boolean efavicons = (prefs.getBoolean("efavicons", false) && !BuildConfig.PLAY_STORE_RELEASE);
|
||||
boolean favicons = prefs.getBoolean("favicons", false);
|
||||
boolean favicons = (prefs.getBoolean("favicons", false) && !BuildConfig.PLAY_STORE_RELEASE);
|
||||
boolean generated = prefs.getBoolean("generated_icons", true);
|
||||
boolean identicons = prefs.getBoolean("identicons", false);
|
||||
boolean circular = prefs.getBoolean("circular", true);
|
||||
|
|
|
@ -112,6 +112,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
private SwitchCompat swFavicons;
|
||||
private SwitchCompat swFaviconsPartial;
|
||||
private TextView tvFaviconsHint;
|
||||
private TextView tvFaviconsPlay;
|
||||
private SwitchCompat swGeneratedIcons;
|
||||
private SwitchCompat swIdenticons;
|
||||
private SwitchCompat swCircular;
|
||||
|
@ -265,6 +266,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
swFavicons = view.findViewById(R.id.swFavicons);
|
||||
swFaviconsPartial = view.findViewById(R.id.swFaviconsPartial);
|
||||
tvFaviconsHint = view.findViewById(R.id.tvFaviconsHint);
|
||||
tvFaviconsPlay = view.findViewById(R.id.tvFaviconsPlay);
|
||||
swGeneratedIcons = view.findViewById(R.id.swGeneratedIcons);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
swCircular = view.findViewById(R.id.swCircular);
|
||||
|
@ -726,7 +728,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
}
|
||||
});
|
||||
|
||||
swEFavicons.setVisibility(BuildConfig.PLAY_STORE_RELEASE ? View.GONE : View.VISIBLE);
|
||||
swEFavicons.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
|
@ -1226,6 +1227,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
|
||||
// Initialize
|
||||
FragmentDialogTheme.setBackground(getContext(), view, false);
|
||||
tvFaviconsPlay.setVisibility(BuildConfig.PLAY_STORE_RELEASE ? View.VISIBLE : View.GONE);
|
||||
swFaviconsPartial.setText(getString(R.string.title_advanced_favicons_partial,
|
||||
Helper.humanReadableByteCount(ContactInfo.FAVICON_READ_BYTES, false)));
|
||||
grpUnzip.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.GONE : View.VISIBLE);
|
||||
|
@ -1337,8 +1339,10 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|||
//swColorStripeWide.setEnabled(swColorStripe.isChecked());
|
||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||
swBimi.setChecked(prefs.getBoolean("bimi", false));
|
||||
swEFavicons.setChecked(prefs.getBoolean("efavicons", false));
|
||||
swFavicons.setChecked(prefs.getBoolean("favicons", false));
|
||||
swEFavicons.setChecked(prefs.getBoolean("efavicons", false) && !BuildConfig.PLAY_STORE_RELEASE);
|
||||
swEFavicons.setEnabled(!BuildConfig.PLAY_STORE_RELEASE);
|
||||
swFavicons.setChecked(prefs.getBoolean("favicons", false) && !BuildConfig.PLAY_STORE_RELEASE);
|
||||
swFavicons.setEnabled(!BuildConfig.PLAY_STORE_RELEASE);
|
||||
swFaviconsPartial.setChecked(prefs.getBoolean("favicons_partial", true));
|
||||
swFaviconsPartial.setEnabled(swFavicons.isChecked());
|
||||
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
||||
|
|
|
@ -921,6 +921,19 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/tvFaviconsHint"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<eu.faircode.email.FixedTextView
|
||||
android:id="@+id/tvFaviconsPlay"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:drawableTint="?attr/colorWarning"
|
||||
android:text="@string/title_advanced_favicons_play"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="?attr/colorWarning"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swFaviconsPartial" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/swGeneratedIcons"
|
||||
android:layout_width="0dp"
|
||||
|
@ -930,7 +943,7 @@
|
|||
android:text="@string/title_advanced_generated_icons"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/swFaviconsPartial"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvFaviconsPlay"
|
||||
app:switchPadding="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
|
|
|
@ -498,6 +498,7 @@
|
|||
<string name="title_advanced_efavicons">Show avatars</string>
|
||||
<string name="title_advanced_favicons">Show favicons</string>
|
||||
<string name="title_advanced_favicons_partial">Scan only the first %1$s of the web page</string>
|
||||
<string name="title_advanced_favicons_play">Google doesn\'t allow favicons for privacy reasons</string>
|
||||
<string name="title_advanced_generated_icons">Show generated icons</string>
|
||||
<string name="title_advanced_identicons">Show identicons</string>
|
||||
<string name="title_advanced_circular">Show round icons</string>
|
||||
|
|
Loading…
Reference in a new issue