mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 21:58:52 +02:00
Added option to show inline images by default
This commit is contained in:
@@ -318,6 +318,7 @@ public class HtmlHelper {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(view.getContext());
|
||||
boolean compact = prefs.getBoolean("compact", false);
|
||||
int zoom = prefs.getInt("zoom", compact ? 0 : 1);
|
||||
boolean inline = prefs.getBoolean("inline_images", false);
|
||||
|
||||
final int px = Helper.dp2pixels(view.getContext(), (zoom + 1) * 24);
|
||||
|
||||
@@ -334,9 +335,10 @@ public class HtmlHelper {
|
||||
boolean data = source.startsWith("data:");
|
||||
|
||||
if (BuildConfig.DEBUG)
|
||||
Log.i("Image show=" + show + " embedded=" + embedded + " data=" + data + " source=" + source);
|
||||
Log.i("Image show=" + show + " inline=" + inline +
|
||||
" embedded=" + embedded + " data=" + data + " source=" + source);
|
||||
|
||||
if (!show) {
|
||||
if (!(show || (inline && (embedded || data)))) {
|
||||
// Show placeholder icon
|
||||
int resid = (embedded || data ? R.drawable.baseline_photo_library_24 : R.drawable.baseline_image_24);
|
||||
Drawable d = res.getDrawable(resid, theme);
|
||||
|
||||
Reference in New Issue
Block a user