From b51a76cf26b3a7a30e7b4832727e4ce8a684947b Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 29 Aug 2024 22:31:47 +0200 Subject: [PATCH] Speak preview --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index ae874ab425..82294e8ac1 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -3673,10 +3673,11 @@ public class FragmentMessages extends FragmentBase String body = Helper.readText(message.getFile(context)); String text = HtmlHelper.getFullText(context, body); + String preview = HtmlHelper.getPreview(text); - if (!TextUtils.isEmpty(text)) + if (!TextUtils.isEmpty(preview)) sb.append(context.getString(R.string.title_rule_tts_content)) - .append(' ').append(text); + .append(' ').append(preview); return sb.toString(); }