Don't hide already revealed entries on OTP update

This commit is contained in:
Jakob Nixdorf 2017-07-06 12:11:30 +02:00
parent 937ddcfb23
commit bc1f8002fa
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -297,6 +297,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
private ViewHolderEventCallback eventCallback;
private boolean ttr_enabled = false;
protected TextView OTPValue;
protected TextView OTPValueCover;
protected TextView OTPLabel;
@ -334,8 +336,10 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
public void setTapToReveal(boolean ttr) {
if (ttr) {
OTPValue.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_visibility_visible, 0, 0, 0);
if (! ttr_enabled || OTPValue.getVisibility() == View.GONE) {
OTPValue.setVisibility(View.GONE);
OTPValueCover.setVisibility(View.VISIBLE);
}
OTPValue.setOnClickListener(new View.OnClickListener() {
@Override
@ -360,6 +364,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
OTPValue.setOnClickListener(null);
OTPValueCover.setOnClickListener(null);
}
ttr_enabled = ttr;
}
@Override