add mention with quasi-quoting

This commit is contained in:
sk 2022-12-29 17:14:38 +01:00
parent 9547be89e1
commit e0521b3c95
1 changed files with 5 additions and 1 deletions

View File

@ -280,7 +280,11 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
v.startAnimation(opacityIn);
Bundle args=new Bundle();
args.putString("account", item.accountID);
args.putString("prefilledText", "\n\n" + item.status.url);
StringBuilder prefilledText = new StringBuilder().append("\n\n");
String ownID = AccountSessionManager.getInstance().getAccount(item.accountID).self.id;
if (!item.status.account.id.equals(ownID)) prefilledText.append('@').append(item.status.account.acct).append(' ');
prefilledText.append(item.status.url);
args.putString("prefilledText", prefilledText.toString());
args.putInt("selectionStart", 0);
Nav.go(item.parentFragment.getActivity(), ComposeFragment.class, args);
});