don't show key tile in contact details when there are no keys
This commit is contained in:
		
							parent
							
								
									b050ff2576
								
							
						
					
					
						commit
						585a538340
					
				| @ -116,6 +116,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp | |||||||
| 	private Button mShowInactiveDevicesButton; | 	private Button mShowInactiveDevicesButton; | ||||||
| 	private QuickContactBadge badge; | 	private QuickContactBadge badge; | ||||||
| 	private LinearLayout keys; | 	private LinearLayout keys; | ||||||
|  | 	private LinearLayout keysWrapper; | ||||||
| 	private FlowLayout tags; | 	private FlowLayout tags; | ||||||
| 	private boolean showDynamicTags = false; | 	private boolean showDynamicTags = false; | ||||||
| 	private boolean showLastSeen = false; | 	private boolean showLastSeen = false; | ||||||
| @ -220,6 +221,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp | |||||||
| 			} | 			} | ||||||
| 		}); | 		}); | ||||||
| 		keys = (LinearLayout) findViewById(R.id.details_contact_keys); | 		keys = (LinearLayout) findViewById(R.id.details_contact_keys); | ||||||
|  | 		keysWrapper = (LinearLayout) findViewById(R.id.keys_wrapper); | ||||||
| 		tags = (FlowLayout) findViewById(R.id.tags); | 		tags = (FlowLayout) findViewById(R.id.tags); | ||||||
| 		mShowInactiveDevicesButton = (Button) findViewById(R.id.show_inactive_devices); | 		mShowInactiveDevicesButton = (Button) findViewById(R.id.show_inactive_devices); | ||||||
| 		if (getActionBar() != null) { | 		if (getActionBar() != null) { | ||||||
| @ -521,11 +523,7 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp | |||||||
| 			}); | 			}); | ||||||
| 			keys.addView(view); | 			keys.addView(view); | ||||||
| 		} | 		} | ||||||
| 		if (hasKeys) { | 		keysWrapper.setVisibility(hasKeys ? View.VISIBLE : View.GONE); | ||||||
| 			keys.setVisibility(View.VISIBLE); |  | ||||||
| 		} else { |  | ||||||
| 			keys.setVisibility(View.GONE); |  | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		List<ListItem.Tag> tagList = contact.getTags(this); | 		List<ListItem.Tag> tagList = contact.getTags(this); | ||||||
| 		if (tagList.size() == 0 || !this.showDynamicTags) { | 		if (tagList.size() == 0 || !this.showDynamicTags) { | ||||||
|  | |||||||
| @ -109,6 +109,7 @@ | |||||||
|         </RelativeLayout> |         </RelativeLayout> | ||||||
| 
 | 
 | ||||||
|         <LinearLayout |         <LinearLayout | ||||||
|  |             android:id="@+id/keys_wrapper" | ||||||
|             android:layout_width="fill_parent" |             android:layout_width="fill_parent" | ||||||
|             android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|             android:layout_marginLeft="@dimen/activity_horizontal_margin" |             android:layout_marginLeft="@dimen/activity_horizontal_margin" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Daniel Gultsch
						Daniel Gultsch