mirror of https://github.com/M66B/FairEmail.git
Log message text sizes / number of images
This commit is contained in:
parent
9b15168b0e
commit
600cd366c0
|
@ -1271,9 +1271,12 @@ public class HtmlHelper {
|
||||||
int max = (reformat ? MAX_FORMAT_TEXT_SIZE : MAX_FULL_TEXT_SIZE);
|
int max = (reformat ? MAX_FORMAT_TEXT_SIZE : MAX_FULL_TEXT_SIZE);
|
||||||
|
|
||||||
int length = 0;
|
int length = 0;
|
||||||
|
int images = 0;
|
||||||
for (Element elm : d.select("*")) {
|
for (Element elm : d.select("*")) {
|
||||||
boolean skip = false;
|
if ("img".equals(elm.tagName()))
|
||||||
|
images++;
|
||||||
|
|
||||||
|
boolean skip = false;
|
||||||
for (Node child : elm.childNodes()) {
|
for (Node child : elm.childNodes()) {
|
||||||
if (child instanceof TextNode) {
|
if (child instanceof TextNode) {
|
||||||
TextNode tnode = ((TextNode) child);
|
TextNode tnode = ((TextNode) child);
|
||||||
|
@ -1298,6 +1301,8 @@ public class HtmlHelper {
|
||||||
elm.remove();
|
elm.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Log.i("Message size=" + length + " images=" + images);
|
||||||
|
|
||||||
return (length >= max);
|
return (length >= max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue