From 2db2ca95ceef7f1a50d50097f95b0d9efd9a79b6 Mon Sep 17 00:00:00 2001 From: Millesimus Date: Sun, 22 Aug 2021 08:55:46 +0200 Subject: [PATCH] Move differentiation between XEP-0393 quotes and French quotes to QuoteHelper. --- .../eu/siacs/conversations/ui/adapter/MessageAdapter.java | 5 ++--- src/main/java/eu/siacs/conversations/utils/MessageUtils.java | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 5c9104343..dd0bdc589 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -371,9 +371,8 @@ public class MessageAdapter extends ArrayAdapter { if (lineStart == -1) { if (previous == '\n') { if ( - (QuoteHelper.isPositionQuoteStart(body, i) - || (current == '\u00bb' && !UIHelper.isPositionFollowedByQuote(body, i) - ))) { + QuoteHelper.isPositionQuoteStart(body, i) + ) { // Line start with quote lineStart = i; if (quoteStart == -1) quoteStart = i; diff --git a/src/main/java/eu/siacs/conversations/utils/MessageUtils.java b/src/main/java/eu/siacs/conversations/utils/MessageUtils.java index c9c029c65..0a11cd720 100644 --- a/src/main/java/eu/siacs/conversations/utils/MessageUtils.java +++ b/src/main/java/eu/siacs/conversations/utils/MessageUtils.java @@ -70,8 +70,7 @@ public class MessageUtils { continue; } final char c = line.charAt(0); - if (QuoteHelper.isNestedTooDeeply(line) - || (c == '\u00bb' && !UIHelper.isPositionFollowedByQuote(line, 0))) { + if (QuoteHelper.isNestedTooDeeply(line)) { continue; } if (builder.length() != 0) {