fix(preview-quote-toots): find the RE: in all the cases I experienced

vmst.io added a <br /> tag that the regex didn't catch. I manually check for it, because it drives me nuts. But it's in the plans to put it all on the regex just because I hate this.
This commit is contained in:
LucasGGamerM
2024-07-06 21:13:44 -03:00
parent 4a783957ed
commit bc08c149b7

View File

@@ -280,6 +280,9 @@ public abstract class StatusDisplayItem{
Matcher matcher=QUOTE_MENTION_PATTERN.matcher(status.content); Matcher matcher=QUOTE_MENTION_PATTERN.matcher(status.content);
if(matcher.find()){ if(matcher.find()){
String quoteMention=matcher.group(); String quoteMention=matcher.group();
// FIXME: This is ugly. I wanna do it all in the regex >:(
if(statusForContent.content.contains("RE:<br />"+quoteMention))
quoteMention = "RE:<br />"+quoteMention;
statusForContent.content=statusForContent.content.replace(quoteMention, ""); statusForContent.content=statusForContent.content.replace(quoteMention, "");
} }
} }