Fix issue #805
This commit is contained in:
parent
edc317f97b
commit
be873f203e
|
@ -748,10 +748,10 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
||||||
case R.id.action_copy_link:
|
case R.id.action_copy_link:
|
||||||
clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
|
|
||||||
clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getUrl());
|
clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getReblog()!=null?status.getReblog().getUrl():status.getUrl());
|
||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toasty.info(context, context.getString(R.string.clipboard), Toast.LENGTH_LONG).show();
|
Toasty.info(context, context.getString(R.string.clipboard_url), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_share:
|
case R.id.action_share:
|
||||||
|
|
|
@ -2048,10 +2048,10 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
||||||
case R.id.action_copy_link:
|
case R.id.action_copy_link:
|
||||||
clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
|
||||||
|
|
||||||
clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getUrl());
|
clip = ClipData.newPlainText(Helper.CLIP_BOARD, status.getReblog()!=null?status.getReblog().getUrl():status.getUrl());
|
||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toasty.info(context, context.getString(R.string.clipboard), Toast.LENGTH_LONG).show();
|
Toasty.info(context, context.getString(R.string.clipboard_url), Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_share:
|
case R.id.action_share:
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
<string name="toast_account_changed" formatted="false">Now works with the account %1$s</string>
|
<string name="toast_account_changed" formatted="false">Now works with the account %1$s</string>
|
||||||
<string name="add_account">Add an account</string>
|
<string name="add_account">Add an account</string>
|
||||||
<string name="clipboard">The content of the toot has been copied to the clipboard</string>
|
<string name="clipboard">The content of the toot has been copied to the clipboard</string>
|
||||||
|
<string name="clipboard_url">The URL of the toot has been copied to the clipboard</string>
|
||||||
<string name="change">Change</string>
|
<string name="change">Change</string>
|
||||||
<string name="choose_picture">Select a picture…</string>
|
<string name="choose_picture">Select a picture…</string>
|
||||||
<string name="clear">Clean</string>
|
<string name="clear">Clean</string>
|
||||||
|
|
Loading…
Reference in New Issue