From 8ea4c84a2992ef5f58b497d1309f5af28f804576 Mon Sep 17 00:00:00 2001 From: Grishka Date: Mon, 26 Feb 2024 17:59:41 +0300 Subject: [PATCH] AND-148 --- .../android/ui/displayitems/LinkCardStatusDisplayItem.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/LinkCardStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/LinkCardStatusDisplayItem.java index 3572242a..81bd7f14 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/LinkCardStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/LinkCardStatusDisplayItem.java @@ -83,6 +83,8 @@ public class LinkCardStatusDisplayItem extends StatusDisplayItem{ description.setVisibility(TextUtils.isEmpty(card.description) ? View.GONE : View.VISIBLE); } String cardDomain=Uri.parse(card.url).getHost(); + if(cardDomain.startsWith("www.")) + cardDomain=cardDomain.substring(4); if(isLarge && !TextUtils.isEmpty(card.authorName)){ domain.setText(itemView.getContext().getString(R.string.article_by_author, card.authorName)+" ยท "+cardDomain); }else{