Backport #1030 added copy user link

This commit is contained in:
Michel Roux 2020-04-22 16:23:57 +02:00
parent f1ebcb6894
commit fbb7a9a298
2 changed files with 10 additions and 0 deletions

View File

@ -1032,6 +1032,12 @@ class UserFragment : BaseFragment(), OnClickListener, OnLinkClickListener,
}
return true
}
R.id.copy_url -> {
val uri = LinkCreator.getUserWebLink(user)
ClipboardUtils.setText(context, uri.toString())
Toast.makeText(context, R.string.message_toast_link_copied_to_clipboard, Toast.LENGTH_SHORT).show()
return true
}
R.id.qr_code -> {
executeAfterFragmentResumed {
val df = UserQrDialogFragment()

View File

@ -86,6 +86,10 @@
android:id="@id/open_in_browser"
android:icon="@drawable/ic_action_web"
android:title="@string/action_open_in_browser"/>
<item
android:id="@id/copy_url"
android:icon="@drawable/ic_action_copy"
android:title="@android:string/copyUrl"/>
<item
android:id="@+id/add_to_home_screen_submenu"
android:icon="@drawable/ic_action_home"