Prevent clicking on account/identity/folder to be deleted

pull/147/head
M66B 6 years ago
parent 05b76d6122
commit 57dccf371e

@ -118,7 +118,10 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
int pos = getAdapterPosition(); int pos = getAdapterPosition();
if (pos == RecyclerView.NO_POSITION) if (pos == RecyclerView.NO_POSITION)
return; return;
EntityAccount account = filtered.get(pos); EntityAccount account = filtered.get(pos);
if (account.tbd != null)
return;
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast( lbm.sendBroadcast(

@ -206,6 +206,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
return; return;
TupleFolderEx folder = filtered.get(pos); TupleFolderEx folder = filtered.get(pos);
if (folder.tbd != null)
return;
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast( lbm.sendBroadcast(
@ -222,6 +224,8 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
return false; return false;
final TupleFolderEx folder = filtered.get(pos); final TupleFolderEx folder = filtered.get(pos);
if (folder.tbd != null)
return false;
PopupMenu popupMenu = new PopupMenu(context, itemView); PopupMenu popupMenu = new PopupMenu(context, itemView);

@ -110,7 +110,10 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
int pos = getAdapterPosition(); int pos = getAdapterPosition();
if (pos == RecyclerView.NO_POSITION) if (pos == RecyclerView.NO_POSITION)
return; return;
TupleIdentityEx identity = filtered.get(pos); TupleIdentityEx identity = filtered.get(pos);
if (identity.tbd != null)
return;
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context); LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
lbm.sendBroadcast( lbm.sendBroadcast(

Loading…
Cancel
Save