add missing language null check

fix #143
This commit is contained in:
sk 2022-12-13 09:15:15 +01:00
parent d1479f142b
commit 93bccc02bf
1 changed files with 1 additions and 0 deletions

View File

@ -121,6 +121,7 @@ public class TextStatusDisplayItem extends StatusDisplayItem{
translateWrap.setVisibility(item.textSelectable && item.translateEnabled &&
!item.status.visibility.isLessVisibleThan(StatusPrivacy.UNLISTED) &&
item.status.language != null &&
(item.session.preferences == null || !item.status.language.equalsIgnoreCase(item.session.preferences.postingDefaultLanguage))
? View.VISIBLE : View.GONE);
translateButton.setText(item.translated ? R.string.translate_show_original : R.string.translate_post);