From bc08c149b7169475cf125ac67d25acff9e9960f4 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Sat, 6 Jul 2024 21:13:44 -0300 Subject: [PATCH] fix(preview-quote-toots): find the RE: in all the cases I experienced vmst.io added a
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. --- .../android/ui/displayitems/StatusDisplayItem.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java index 68d4950ef..c4bb96ece 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/StatusDisplayItem.java @@ -280,6 +280,9 @@ public abstract class StatusDisplayItem{ Matcher matcher=QUOTE_MENTION_PATTERN.matcher(status.content); if(matcher.find()){ String quoteMention=matcher.group(); + // FIXME: This is ugly. I wanna do it all in the regex >:( + if(statusForContent.content.contains("RE:
"+quoteMention)) + quoteMention = "RE:
"+quoteMention; statusForContent.content=statusForContent.content.replace(quoteMention, ""); } }