Don't hide already revealed entries on OTP update
This commit is contained in:
parent
937ddcfb23
commit
bc1f8002fa
1 changed files with 8 additions and 2 deletions
|
@ -297,6 +297,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
|
||||||
|
|
||||||
private ViewHolderEventCallback eventCallback;
|
private ViewHolderEventCallback eventCallback;
|
||||||
|
|
||||||
|
private boolean ttr_enabled = false;
|
||||||
|
|
||||||
protected TextView OTPValue;
|
protected TextView OTPValue;
|
||||||
protected TextView OTPValueCover;
|
protected TextView OTPValueCover;
|
||||||
protected TextView OTPLabel;
|
protected TextView OTPLabel;
|
||||||
|
@ -334,8 +336,10 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
|
||||||
public void setTapToReveal(boolean ttr) {
|
public void setTapToReveal(boolean ttr) {
|
||||||
if (ttr) {
|
if (ttr) {
|
||||||
OTPValue.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_visibility_visible, 0, 0, 0);
|
OTPValue.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_visibility_visible, 0, 0, 0);
|
||||||
|
if (! ttr_enabled || OTPValue.getVisibility() == View.GONE) {
|
||||||
OTPValue.setVisibility(View.GONE);
|
OTPValue.setVisibility(View.GONE);
|
||||||
OTPValueCover.setVisibility(View.VISIBLE);
|
OTPValueCover.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
OTPValue.setOnClickListener(new View.OnClickListener() {
|
OTPValue.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -360,6 +364,8 @@ public class EntriesCardAdapter extends RecyclerView.Adapter<EntriesCardAdapter.
|
||||||
OTPValue.setOnClickListener(null);
|
OTPValue.setOnClickListener(null);
|
||||||
OTPValueCover.setOnClickListener(null);
|
OTPValueCover.setOnClickListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ttr_enabled = ttr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue