From b5b3cb42a1976f1d0d33acc81cc511ebe284ff6b Mon Sep 17 00:00:00 2001 From: sk Date: Fri, 6 Oct 2023 17:09:57 +0200 Subject: [PATCH] re-implement missing "translate opened only" --- .../joinmastodon/android/fragments/StatusListFragment.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java index c58d761d70..8459c6a84f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/StatusListFragment.java @@ -42,10 +42,12 @@ protected List buildDisplayItems(Status s){ boolean isMainThreadStatus = this instanceof ThreadFragment t && s.id.equals(t.mainStatus.id); int flags = 0; AccountLocalPreferences lp=getLocalPrefs(); - if (GlobalUserPreferences.spectatorMode) + if(GlobalUserPreferences.spectatorMode) flags |= StatusDisplayItem.FLAG_NO_FOOTER; - if (!lp.emojiReactionsEnabled || lp.showEmojiReactions==ONLY_OPENED) + if(!lp.emojiReactionsEnabled || lp.showEmojiReactions==ONLY_OPENED) flags |= StatusDisplayItem.FLAG_NO_EMOJI_REACTIONS; + if(GlobalUserPreferences.translateButtonOpenedOnly) + flags |= StatusDisplayItem.FLAG_NO_TRANSLATE; return StatusDisplayItem.buildItems(this, s, accountID, s, knownAccounts, getFilterContext(), isMainThreadStatus ? 0 : flags); }