From 3a1671ae38ca8d19256a12d124fd62f938680bc7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 20 Dec 2022 14:03:48 +0100 Subject: [PATCH] Respect blank spaces between words --- .../main/java/app/fedilab/android/helper/SpannableHelper.java | 2 ++ src/fdroid/fastlane/metadata/android/en/changelogs/451.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java index 24dd5640..77cc88e0 100644 --- a/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/SpannableHelper.java @@ -185,6 +185,8 @@ public class SpannableHelper { urlDetails.put(url, urlText); } } + text = text.trim().replaceAll("\\s{3}", "   "); + text = text.trim().replaceAll("\\s{2}", "  "); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) initialContent = new SpannableString(Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY)); else diff --git a/src/fdroid/fastlane/metadata/android/en/changelogs/451.txt b/src/fdroid/fastlane/metadata/android/en/changelogs/451.txt index 146394a3..85356eed 100644 --- a/src/fdroid/fastlane/metadata/android/en/changelogs/451.txt +++ b/src/fdroid/fastlane/metadata/android/en/changelogs/451.txt @@ -4,6 +4,7 @@ Added: Changed: - Display translate button only when language is different +- Respect blank spaces between words in messages Fixed: - Behavior with cw toggle