diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java index bba590691..496e709be 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java @@ -745,6 +745,15 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On clipboard.setPrimaryClip(clip); Toasty.info(context,context.getString(R.string.clipboard),Toast.LENGTH_LONG).show(); return true; + case R.id.action_copy_link: + clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); + + clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getUrl()); + if (clipboard != null) { + clipboard.setPrimaryClip(clip); + Toasty.info(context, context.getString(R.string.clipboard), Toast.LENGTH_LONG).show(); + } + return true; case R.id.action_share: Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.shared_via)); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java index 5ae9072c1..5aa3f1a08 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java @@ -2045,6 +2045,15 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct Toasty.info(context, context.getString(R.string.clipboard), Toast.LENGTH_LONG).show(); } return true; + case R.id.action_copy_link: + clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); + + clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getUrl()); + if (clipboard != null) { + clipboard.setPrimaryClip(clip); + Toasty.info(context, context.getString(R.string.clipboard), Toast.LENGTH_LONG).show(); + } + return true; case R.id.action_share: Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.shared_via)); diff --git a/app/src/main/res/menu/option_toot.xml b/app/src/main/res/menu/option_toot.xml index bc19541b2..9c0c88af6 100644 --- a/app/src/main/res/menu/option_toot.xml +++ b/app/src/main/res/menu/option_toot.xml @@ -22,6 +22,10 @@ android:id="@+id/action_share" android:title="@string/more_action_6" app:showAsAction="never" /> + All Support the app Open Collective enables groups to quickly set up a collective, raise funds and manage them transparently. + Copy link