show "add linked id" button only for secret keys
This commit is contained in:
parent
a363a6cacb
commit
993cb57d92
|
@ -85,14 +85,9 @@ public class IdentitiesPresenter implements LoaderCallbacks<List<IdentityInfo>>
|
|||
});
|
||||
view.setIdentitiesAdapter(identitiesAdapter);
|
||||
|
||||
view.setAddLinkedIdButtonVisible(showLinkedIds);
|
||||
view.setAddLinkedIdButtonVisible(showLinkedIds && isSecret);
|
||||
|
||||
view.setIdentitiesCardListener(new IdentitiesCardListener() {
|
||||
@Override
|
||||
public void onClickAddIdentity() {
|
||||
addLinkedIdentity();
|
||||
}
|
||||
});
|
||||
view.setIdentitiesCardListener(() -> addLinkedIdentity());
|
||||
}
|
||||
|
||||
public void startLoader(LoaderManager loaderManager) {
|
||||
|
|
|
@ -50,12 +50,9 @@ public class IdentitiesCardView extends CardView implements IdentitiesMvpView {
|
|||
vIdentities.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST, false));
|
||||
|
||||
linkedIdsAddButton = view.findViewById(R.id.view_key_card_linked_ids_add);
|
||||
linkedIdsAddButton.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (identitiesCardListener != null) {
|
||||
identitiesCardListener.onClickAddIdentity();
|
||||
}
|
||||
linkedIdsAddButton.setOnClickListener(v -> {
|
||||
if (identitiesCardListener != null) {
|
||||
identitiesCardListener.onClickAddIdentity();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue