copy post URL on long click

This commit is contained in:
sk 2022-12-19 15:14:54 +01:00
parent c0c5e83f31
commit ba36347f03
1 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,7 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
favorite.setOnClickListener(this::onFavoriteClick);
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
share.setOnClickListener(this::onShareClick);
share.setOnLongClickListener(this::onShareLongClick);
share.setAccessibilityDelegate(buttonAccessibilityDelegate);
}
@ -127,6 +128,11 @@ public class FooterStatusDisplayItem extends StatusDisplayItem{
v.getContext().startActivity(Intent.createChooser(intent, v.getContext().getString(R.string.share_toot_title)));
}
private boolean onShareLongClick(View v){
UiUtils.copyText(v.getContext(), item.status.url);
return true;
}
private int descriptionForId(int id){
if(id==R.id.reply_btn)
return R.string.button_reply;