Clear pin on confirm screen on submit.

master
Alan Evans 2020-02-01 11:00:06 -05:00 committed by Greyson Parrelli
parent c2bc376f87
commit 4a8c312e0a
2 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ public class ConfirmKbsPinFragment extends BaseKbsPinFragment<ConfirmKbsPinViewM
case PIN_DOES_NOT_MATCH:
getLabel().setText(SpanUtil.color(ContextCompat.getColor(requireContext(), R.color.red),
getString(R.string.ConfirmKbsPinFragment__pins_dont_match)));
getInput().getText().clear();
break;
}
}

View File

@ -43,10 +43,10 @@ final class ConfirmKbsPinViewModel extends ViewModel implements BaseKbsPinViewMo
@Override
public void confirm() {
KbsPin userEntry = this.userEntry.getValue();
this.userEntry.setValue(KbsPin.EMPTY);
if (pinToConfirm.toString().equals(userEntry.toString())) {
this.label.setValue(Label.CREATING_PIN);
this.userEntry.setValue(KbsPin.EMPTY);
this.saveAnimation.setValue(SaveAnimation.LOADING);
repository.setPin(pinToConfirm, Preconditions.checkNotNull(this.keyboard.getValue()), this::handleResult);