On quoting, translate French quotes to XEP-0393 quotes.
This commit is contained in:
parent
2db2ca95ce
commit
a0529a4e1e
|
@ -24,6 +24,7 @@ import java.util.concurrent.Executors;
|
||||||
|
|
||||||
import eu.siacs.conversations.Config;
|
import eu.siacs.conversations.Config;
|
||||||
import eu.siacs.conversations.R;
|
import eu.siacs.conversations.R;
|
||||||
|
import eu.siacs.conversations.ui.util.QuoteHelper;
|
||||||
|
|
||||||
public class EditMessage extends EmojiWrapperEditText {
|
public class EditMessage extends EmojiWrapperEditText {
|
||||||
|
|
||||||
|
@ -142,7 +143,8 @@ public class EditMessage extends EmojiWrapperEditText {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void insertAsQuote(String text) {
|
public void insertAsQuote(String text) {
|
||||||
text = text.replaceAll("(\n *){2,}", "\n").replaceAll("(^|\n)>", "$1>>").replaceAll("(^|\n)([^>])", "$1> $2").replaceAll("\n$", "");
|
text = QuoteHelper.replaceAltQuoteCharsInText(text);
|
||||||
|
text = text.replaceAll("(\n *){2,}", "\n").replaceAll("(^|\n)(" + QuoteHelper.QUOTE_CHAR + ")", "$1$2$2").replaceAll("(^|\n)([^>" + QuoteHelper.QUOTE_CHAR + "])", "$1> $2").replaceAll("\n$", "");
|
||||||
Editable editable = getEditableText();
|
Editable editable = getEditableText();
|
||||||
int position = getSelectionEnd();
|
int position = getSelectionEnd();
|
||||||
if (position == -1) position = editable.length();
|
if (position == -1) position = editable.length();
|
||||||
|
|
Loading…
Reference in New Issue