From 585a53834041c502c4ab9162dd41801a30b2a627 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 12 Jan 2017 20:50:53 +0100 Subject: don't show key tile in contact details when there are no keys --- .../java/eu/siacs/conversations/ui/ContactDetailsActivity.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/main/java/eu/siacs') diff --git a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java index 69936b1d..1b76173a 100644 --- a/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -116,6 +116,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp private Button mShowInactiveDevicesButton; private QuickContactBadge badge; private LinearLayout keys; + private LinearLayout keysWrapper; private FlowLayout tags; private boolean showDynamicTags = false; private boolean showLastSeen = false; @@ -220,6 +221,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp } }); keys = (LinearLayout) findViewById(R.id.details_contact_keys); + keysWrapper = (LinearLayout) findViewById(R.id.keys_wrapper); tags = (FlowLayout) findViewById(R.id.tags); mShowInactiveDevicesButton = (Button) findViewById(R.id.show_inactive_devices); if (getActionBar() != null) { @@ -521,11 +523,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp }); keys.addView(view); } - if (hasKeys) { - keys.setVisibility(View.VISIBLE); - } else { - keys.setVisibility(View.GONE); - } + keysWrapper.setVisibility(hasKeys ? View.VISIBLE : View.GONE); List tagList = contact.getTags(this); if (tagList.size() == 0 || !this.showDynamicTags) { -- cgit v1.2.3