contact jid copy button

This commit is contained in:
kosyak 2024-05-18 13:33:30 +02:00
parent 753ec13f25
commit ee57da5320
2 changed files with 6 additions and 1 deletions

View file

@ -67,6 +67,7 @@ import eu.siacs.conversations.ui.util.AvatarWorkerTask;
import eu.siacs.conversations.ui.util.GridManager; import eu.siacs.conversations.ui.util.GridManager;
import eu.siacs.conversations.ui.util.JidDialog; import eu.siacs.conversations.ui.util.JidDialog;
import eu.siacs.conversations.ui.util.MenuDoubleTabUtil; import eu.siacs.conversations.ui.util.MenuDoubleTabUtil;
import eu.siacs.conversations.ui.util.ShareUtil;
import eu.siacs.conversations.ui.util.SoftKeyboardUtils; import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
import eu.siacs.conversations.utils.AccountUtils; import eu.siacs.conversations.utils.AccountUtils;
import eu.siacs.conversations.utils.Compatibility; import eu.siacs.conversations.utils.Compatibility;
@ -514,6 +515,8 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
} }
binding.detailsContactjid.setText(IrregularUnicodeDetector.style(this, contact.getJid())); binding.detailsContactjid.setText(IrregularUnicodeDetector.style(this, contact.getJid()));
binding.detailsContactjid.setOnClickListener(v -> ShareUtil.copyJidToClipboard(ContactDetailsActivity.this, contact.getJid()));
String account; String account;
if (Config.DOMAIN_LOCK != null) { if (Config.DOMAIN_LOCK != null) {
account = contact.getAccount().getJid().getEscapedLocal(); account = contact.getAccount().getJid().getEscapedLocal();

View file

@ -57,7 +57,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/account_settings_example_jabber_id" android:text="@string/account_settings_example_jabber_id"
android:textAppearance="@style/TextAppearance.Conversations.Title" /> android:textAppearance="@style/TextAppearance.Conversations.Title"
android:drawablePadding="4dp"
app:drawableEndCompat="?attr/icon_copy_bar_small" />
<com.wefika.flowlayout.FlowLayout <com.wefika.flowlayout.FlowLayout
android:id="@+id/tags" android:id="@+id/tags"