From b11f76bea6bbed42301433ca3ec55b66b08b8942 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 31 Mar 2018 22:50:35 +0200 Subject: add scan action to contact details --- src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index d4b3218ee..bb0e668d6 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -594,6 +594,10 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp } else { binding.showInactiveDevices.setVisibility(View.GONE); } + binding.scanButton.setVisibility(hasKeys ? View.VISIBLE : View.GONE); + if (hasKeys) { + binding.scanButton.setOnClickListener((v) -> ScanActivity.scan(this)); + } if (Config.supportOpenPgp() && contact.getPgpKeyId() != 0) { hasKeys = true; View view = inflater.inflate(R.layout.contact_key, binding.detailsContactKeys, false); -- cgit v1.2.3