mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Show copy SIP URI icon & do it on click in call history like in conversation details
This commit is contained in:
parent
80eaf08fbf
commit
9255830fe2
2 changed files with 11 additions and 0 deletions
|
|
@ -182,6 +182,10 @@ class HistoryFragment : SlidingPaneChildFragment() {
|
|||
binding.setMenuClickListener {
|
||||
showPopupMenu()
|
||||
}
|
||||
|
||||
binding.setCopyPeerSipUriClickListener {
|
||||
copyNumberOrAddressToClipboard(viewModel.callLogModel.value?.sipUri.orEmpty())
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyNumberOrAddressToClipboard(value: String) {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
<variable
|
||||
name="menuClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="copyPeerSipUriClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="org.linphone.ui.main.history.viewmodel.HistoryViewModel" />
|
||||
|
|
@ -120,6 +123,7 @@
|
|||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/address"
|
||||
android:onClick="@{copyPeerSipUriClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
|
|
@ -129,7 +133,10 @@
|
|||
android:textSize="14sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:drawableEnd="@drawable/copy"
|
||||
android:drawablePadding="5dp"
|
||||
android:visibility="@{viewModel.isConferenceCallLog || viewModel.hideSipAddresses ? View.GONE : View.VISIBLE}"
|
||||
app:drawableTint="?attr/color_main2_600"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/name" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue