From 5fd2e322f6caf8f6c9d00fd5871f82f6ba336c70 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Sat, 6 Jul 2024 12:53:38 +0200 Subject: [PATCH] fix(StatusDisplayItem): don't display self-referential quotes --- .../android/ui/displayitems/StatusDisplayItem.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 b4682c4a6..d0f703d60 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 @@ -424,8 +424,12 @@ public abstract class StatusDisplayItem{ @Override public void onSuccess(SearchResults results){ if (!results.statuses.isEmpty()){ - status.quote=results.statuses.get(0); - fragment.updateStatusWithQuote(status); + Status quote=results.statuses.get(0); + // don't show self-referential quotes + if(!Objects.equals(status.id, results.statuses.get(0).id)){ + status.quote=quote; + fragment.updateStatusWithQuote(status); + } } }