mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 14:48:35 +00:00
Clear text entry after changing PIN types.
This commit is contained in:
parent
a6786e5c2b
commit
c21d4861c0
@ -39,8 +39,11 @@ public class CreateKbsPinFragment extends BaseKbsPinFragment<CreateKbsPinViewMod
|
|||||||
protected CreateKbsPinViewModel initializeViewModel() {
|
protected CreateKbsPinViewModel initializeViewModel() {
|
||||||
CreateKbsPinViewModel viewModel = ViewModelProviders.of(this).get(CreateKbsPinViewModel.class);
|
CreateKbsPinViewModel viewModel = ViewModelProviders.of(this).get(CreateKbsPinViewModel.class);
|
||||||
|
|
||||||
viewModel.getKeyboard().observe(getViewLifecycleOwner(), k -> getLabel().setText(getLabelText(k)));
|
|
||||||
viewModel.getNavigationEvents().observe(getViewLifecycleOwner(), e -> onConfirmPin(e.getUserEntry(), e.getKeyboard()));
|
viewModel.getNavigationEvents().observe(getViewLifecycleOwner(), e -> onConfirmPin(e.getUserEntry(), e.getKeyboard()));
|
||||||
|
viewModel.getKeyboard().observe(getViewLifecycleOwner(), k -> {
|
||||||
|
getLabel().setText(getLabelText(k));
|
||||||
|
getInput().getText().clear();
|
||||||
|
});
|
||||||
|
|
||||||
return viewModel;
|
return viewModel;
|
||||||
}
|
}
|
||||||
|
@ -257,6 +257,8 @@ public final class RegistrationLockFragment extends BaseRegistrationFragment {
|
|||||||
|
|
||||||
pinEntry.setInputType(isAlphaNumeric ? InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
|
pinEntry.setInputType(isAlphaNumeric ? InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD
|
||||||
: InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
|
: InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
|
||||||
|
|
||||||
|
pinEntry.getText().clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
private @StringRes static int resolveKeyboardToggleText(@NonNull PinKeyboardType keyboard) {
|
private @StringRes static int resolveKeyboardToggleText(@NonNull PinKeyboardType keyboard) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user