mirror of https://github.com/M66B/FairEmail.git
Debug: ignore formatted size
This commit is contained in:
parent
9ce09e3e72
commit
b97ae1882c
|
@ -190,6 +190,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
private SwitchCompat swBrowserZoom;
|
private SwitchCompat swBrowserZoom;
|
||||||
private SwitchCompat swFakeDark;
|
private SwitchCompat swFakeDark;
|
||||||
private EditText etViewportHeight;
|
private EditText etViewportHeight;
|
||||||
|
private SwitchCompat swIgnoreFormattedSize;
|
||||||
private SwitchCompat swShowRecent;
|
private SwitchCompat swShowRecent;
|
||||||
private SwitchCompat swModSeq;
|
private SwitchCompat swModSeq;
|
||||||
private SwitchCompat swPreamble;
|
private SwitchCompat swPreamble;
|
||||||
|
@ -283,6 +284,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
"chunk_size", "thread_range",
|
"chunk_size", "thread_range",
|
||||||
"autoscroll_editor", "undo_manager",
|
"autoscroll_editor", "undo_manager",
|
||||||
"browser_zoom", "fake_dark",
|
"browser_zoom", "fake_dark",
|
||||||
|
"ignore_formatted_size",
|
||||||
"show_recent",
|
"show_recent",
|
||||||
"use_modseq", "preamble", "uid_command", "perform_expunge", "uid_expunge",
|
"use_modseq", "preamble", "uid_command", "perform_expunge", "uid_expunge",
|
||||||
"auth_plain", "auth_login", "auth_ntlm", "auth_sasl", "auth_apop", "use_top", "forget_top",
|
"auth_plain", "auth_login", "auth_ntlm", "auth_sasl", "auth_apop", "use_top", "forget_top",
|
||||||
|
@ -433,6 +435,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
swBrowserZoom = view.findViewById(R.id.swBrowserZoom);
|
swBrowserZoom = view.findViewById(R.id.swBrowserZoom);
|
||||||
swFakeDark = view.findViewById(R.id.swFakeDark);
|
swFakeDark = view.findViewById(R.id.swFakeDark);
|
||||||
etViewportHeight = view.findViewById(R.id.etViewportHeight);
|
etViewportHeight = view.findViewById(R.id.etViewportHeight);
|
||||||
|
swIgnoreFormattedSize = view.findViewById(R.id.swIgnoreFormattedSize);
|
||||||
swShowRecent = view.findViewById(R.id.swShowRecent);
|
swShowRecent = view.findViewById(R.id.swShowRecent);
|
||||||
swModSeq = view.findViewById(R.id.swModSeq);
|
swModSeq = view.findViewById(R.id.swModSeq);
|
||||||
swPreamble = view.findViewById(R.id.swPreamble);
|
swPreamble = view.findViewById(R.id.swPreamble);
|
||||||
|
@ -1339,6 +1342,13 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
swIgnoreFormattedSize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
prefs.edit().putBoolean("ignore_formatted_size", checked).apply();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
swShowRecent.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
swShowRecent.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||||
|
@ -2363,6 +2373,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
||||||
etViewportHeight.setText(Integer.toString(vh));
|
etViewportHeight.setText(Integer.toString(vh));
|
||||||
} else
|
} else
|
||||||
etViewportHeight.setText(null);
|
etViewportHeight.setText(null);
|
||||||
|
swIgnoreFormattedSize.setChecked(prefs.getBoolean("ignore_formatted_size", false));
|
||||||
swShowRecent.setChecked(prefs.getBoolean("show_recent", false));
|
swShowRecent.setChecked(prefs.getBoolean("show_recent", false));
|
||||||
swModSeq.setChecked(prefs.getBoolean("use_modseq", true));
|
swModSeq.setChecked(prefs.getBoolean("use_modseq", true));
|
||||||
swPreamble.setChecked(prefs.getBoolean("preamble", false));
|
swPreamble.setChecked(prefs.getBoolean("preamble", false));
|
||||||
|
|
|
@ -449,6 +449,11 @@ public class HtmlHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getMaxFormatTextSize(Context context) {
|
private static int getMaxFormatTextSize(Context context) {
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean ignore_formatted_size = prefs.getBoolean("ignore_formatted_size", false);
|
||||||
|
if (ignore_formatted_size)
|
||||||
|
return Integer.MAX_VALUE;
|
||||||
|
|
||||||
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);
|
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);
|
||||||
int mc = am.getMemoryClass();
|
int mc = am.getMemoryClass();
|
||||||
if (mc >= 256)
|
if (mc >= 256)
|
||||||
|
|
|
@ -1275,6 +1275,18 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvViewportHeight" />
|
app:layout_constraintTop_toBottomOf="@id/tvViewportHeight" />
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
android:id="@+id/swIgnoreFormattedSize"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:checked="true"
|
||||||
|
android:text="@string/title_advanced_ignore_formatted_size"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/etViewportHeight"
|
||||||
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
android:id="@+id/swShowRecent"
|
android:id="@+id/swShowRecent"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -1284,7 +1296,7 @@
|
||||||
android:text="@string/title_advanced_show_recent"
|
android:text="@string/title_advanced_show_recent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/etViewportHeight"
|
app:layout_constraintTop_toBottomOf="@id/swIgnoreFormattedSize"
|
||||||
app:switchPadding="12dp" />
|
app:switchPadding="12dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.SwitchCompat
|
<androidx.appcompat.widget.SwitchCompat
|
||||||
|
|
|
@ -933,6 +933,7 @@
|
||||||
<string name="title_advanced_browser_zoom" translatable="false">Use browser zoom</string>
|
<string name="title_advanced_browser_zoom" translatable="false">Use browser zoom</string>
|
||||||
<string name="title_advanced_fake_dark" translatable="false">Fake dark</string>
|
<string name="title_advanced_fake_dark" translatable="false">Fake dark</string>
|
||||||
<string name="title_advanced_viewport_height" translatable="false">Viewport height</string>
|
<string name="title_advanced_viewport_height" translatable="false">Viewport height</string>
|
||||||
|
<string name="title_advanced_ignore_formatted_size" translatable="false">Ignore formatted size</string>
|
||||||
<string name="title_advanced_show_recent" translatable="false">Show recent flag</string>
|
<string name="title_advanced_show_recent" translatable="false">Show recent flag</string>
|
||||||
<string name="title_advanced_modseq" translatable="false">MODSEQ</string>
|
<string name="title_advanced_modseq" translatable="false">MODSEQ</string>
|
||||||
<string name="title_advanced_preamble" translatable="false">Preamble</string>
|
<string name="title_advanced_preamble" translatable="false">Preamble</string>
|
||||||
|
|
Loading…
Reference in New Issue