mirror of https://github.com/M66B/FairEmail.git
Fixed AMP viewport
This commit is contained in:
parent
dc4ed4b05e
commit
bc052888e2
|
@ -210,6 +210,9 @@ public class ActivityAMP extends ActivityBase {
|
||||||
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
|
throw new IllegalArgumentException(context.getString(R.string.title_no_stream));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
boolean overview_mode = prefs.getBoolean("overview_mode", false);
|
||||||
|
|
||||||
String html;
|
String html;
|
||||||
ContentResolver resolver = context.getContentResolver();
|
ContentResolver resolver = context.getContentResolver();
|
||||||
try (InputStream is = resolver.openInputStream(uri)) {
|
try (InputStream is = resolver.openInputStream(uri)) {
|
||||||
|
@ -217,7 +220,7 @@ public class ActivityAMP extends ActivityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
Document d = JsoupEx.parse(html);
|
Document d = JsoupEx.parse(html);
|
||||||
HtmlHelper.setViewport(d, false);
|
HtmlHelper.setViewport(d, overview_mode);
|
||||||
|
|
||||||
for (Element script : d.select("script")) {
|
for (Element script : d.select("script")) {
|
||||||
String src = script.attr("src");
|
String src = script.attr("src");
|
||||||
|
|
Loading…
Reference in New Issue