This commit is contained in:
stom79 2019-02-13 09:26:35 +01:00
parent 47ce52df39
commit edc317f97b
4 changed files with 23 additions and 0 deletions

View File

@ -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));

View File

@ -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));

View File

@ -22,6 +22,10 @@
android:id="@+id/action_share"
android:title="@string/more_action_6"
app:showAsAction="never" />
<item
android:id="@+id/action_copy_link"
android:title="@string/copy_link"
app:showAsAction="never" />
<item
android:id="@+id/action_timed_mute"
android:title="@string/more_action_8"

View File

@ -871,6 +871,7 @@
<string name="all">All</string>
<string name="about_opencollective">Support the app</string>
<string name="more_about_opencollective">Open Collective enables groups to quickly set up a collective, raise funds and manage them transparently.</string>
<string name="copy_link">Copy link</string>
<!-- end languages -->