Merge pull request #1267 from Xefir/1030
Backport #1030 added copy user link
This commit is contained in:
commit
69603d16aa
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue