From fdca799a5f3eecefc9717d6050c8eb718b27235c Mon Sep 17 00:00:00 2001 From: sk Date: Thu, 16 Mar 2023 18:49:40 +0100 Subject: [PATCH] add todo --- .../android/ui/displayitems/TextStatusDisplayItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java index 83a8b7ef1..2cc7913fc 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/displayitems/TextStatusDisplayItem.java @@ -166,12 +166,12 @@ public class TextStatusDisplayItem extends StatusDisplayItem{ boolean translateEnabled = !item.disableTranslate && instanceInfo != null && instanceInfo.v2 != null && instanceInfo.v2.configuration.translation != null && instanceInfo.v2.configuration.translation.enabled; - boolean isBottomText = BOTTOM_TEXT_PATTERN.matcher(item.status.getStrippedText()).find(); boolean translateVisible = (isBottomText || ( translateEnabled && !item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) && item.status.language != null && + // todo: compare to user's locale instead (how do i query that?!) (item.session.preferences == null || !item.status.language.equalsIgnoreCase(item.session.preferences.postingDefaultLanguage)))) && (!GlobalUserPreferences.translateButtonOpenedOnly || item.textSelectable); translateWrap.setVisibility(translateVisible ? View.VISIBLE : View.GONE);