refactor(compose): use UiUtils.getVisibiltyText
This commit is contained in:
parent
6c1424055f
commit
047e72ce9c
|
@ -650,13 +650,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
|
||||||
else view.findViewById(R.id.display_item_text).setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, V.dp(16)));
|
else view.findViewById(R.id.display_item_text).setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, V.dp(16)));
|
||||||
|
|
||||||
replyText.setText(getString(R.string.in_reply_to, replyTo.account.displayName));
|
replyText.setText(getString(R.string.in_reply_to, replyTo.account.displayName));
|
||||||
int visibilityNameRes = switch (replyTo.visibility) {
|
replyText.setContentDescription(getString(R.string.in_reply_to, replyTo.account.displayName) + ". " + getString(R.string.post_visibility) + ": " + UiUtils.getVisibilityText(replyTo));
|
||||||
case PUBLIC -> R.string.visibility_public;
|
|
||||||
case UNLISTED -> R.string.sk_visibility_unlisted;
|
|
||||||
case PRIVATE -> R.string.visibility_followers_only;
|
|
||||||
case DIRECT -> R.string.visibility_private;
|
|
||||||
};
|
|
||||||
replyText.setContentDescription(getString(R.string.in_reply_to, replyTo.account.displayName) + ". " + getString(R.string.post_visibility) + ": " + getString(visibilityNameRes));
|
|
||||||
|
|
||||||
ArrayList<String> mentions=new ArrayList<>();
|
ArrayList<String> mentions=new ArrayList<>();
|
||||||
String ownID=AccountSessionManager.getInstance().getAccount(accountID).self.id;
|
String ownID=AccountSessionManager.getInstance().getAccount(accountID).self.id;
|
||||||
|
|
Loading…
Reference in New Issue