Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
copy post URL on long click
Browse files Browse the repository at this point in the history
  • Loading branch information
sk22 committed Dec 19, 2022
1 parent c0c5e83 commit ba36347
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public Holder(Activity activity, ViewGroup parent){
favorite.setOnClickListener(this::onFavoriteClick);
favorite.setAccessibilityDelegate(buttonAccessibilityDelegate);
share.setOnClickListener(this::onShareClick);
share.setOnLongClickListener(this::onShareLongClick);
share.setAccessibilityDelegate(buttonAccessibilityDelegate);
}

Expand Down Expand Up @@ -127,6 +128,11 @@ private void onShareClick(View v){
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;
Expand Down

0 comments on commit ba36347

Please sign in to comment.