mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
parent
1ed0fe7fce
commit
0bc172aab0
1 changed files with 9 additions and 5 deletions
|
@ -690,11 +690,15 @@ public class ServiceSynchronize extends LifecycleService {
|
||||||
if (!TextUtils.isEmpty(message.subject))
|
if (!TextUtils.isEmpty(message.subject))
|
||||||
sb.append(message.subject).append("<br>");
|
sb.append(message.subject).append("<br>");
|
||||||
String text = Jsoup.parse(body).text();
|
String text = Jsoup.parse(body).text();
|
||||||
|
if (!TextUtils.isEmpty(text)) {
|
||||||
|
sb.append("<em>");
|
||||||
if (text.length() > HtmlHelper.PREVIEW_SIZE) {
|
if (text.length() > HtmlHelper.PREVIEW_SIZE) {
|
||||||
sb.append(text.substring(0, HtmlHelper.PREVIEW_SIZE));
|
sb.append(text.substring(0, HtmlHelper.PREVIEW_SIZE));
|
||||||
sb.append("…");
|
sb.append("…");
|
||||||
} else
|
} else
|
||||||
sb.append(text);
|
sb.append(text);
|
||||||
|
sb.append("</em>");
|
||||||
|
}
|
||||||
mbuilder.setStyle(new Notification.BigTextStyle().bigText(HtmlHelper.fromHtml(sb.toString())));
|
mbuilder.setStyle(new Notification.BigTextStyle().bigText(HtmlHelper.fromHtml(sb.toString())));
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
|
Loading…
Reference in a new issue