mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 17:48:33 +00:00
Clear pin on confirm screen on submit.
This commit is contained in:
parent
c2bc376f87
commit
4a8c312e0a
@ -81,6 +81,7 @@ public class ConfirmKbsPinFragment extends BaseKbsPinFragment<ConfirmKbsPinViewM
|
|||||||
case PIN_DOES_NOT_MATCH:
|
case PIN_DOES_NOT_MATCH:
|
||||||
getLabel().setText(SpanUtil.color(ContextCompat.getColor(requireContext(), R.color.red),
|
getLabel().setText(SpanUtil.color(ContextCompat.getColor(requireContext(), R.color.red),
|
||||||
getString(R.string.ConfirmKbsPinFragment__pins_dont_match)));
|
getString(R.string.ConfirmKbsPinFragment__pins_dont_match)));
|
||||||
|
getInput().getText().clear();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,10 @@ final class ConfirmKbsPinViewModel extends ViewModel implements BaseKbsPinViewMo
|
|||||||
@Override
|
@Override
|
||||||
public void confirm() {
|
public void confirm() {
|
||||||
KbsPin userEntry = this.userEntry.getValue();
|
KbsPin userEntry = this.userEntry.getValue();
|
||||||
|
this.userEntry.setValue(KbsPin.EMPTY);
|
||||||
|
|
||||||
if (pinToConfirm.toString().equals(userEntry.toString())) {
|
if (pinToConfirm.toString().equals(userEntry.toString())) {
|
||||||
this.label.setValue(Label.CREATING_PIN);
|
this.label.setValue(Label.CREATING_PIN);
|
||||||
this.userEntry.setValue(KbsPin.EMPTY);
|
|
||||||
this.saveAnimation.setValue(SaveAnimation.LOADING);
|
this.saveAnimation.setValue(SaveAnimation.LOADING);
|
||||||
|
|
||||||
repository.setPin(pinToConfirm, Preconditions.checkNotNull(this.keyboard.getValue()), this::handleResult);
|
repository.setPin(pinToConfirm, Preconditions.checkNotNull(this.keyboard.getValue()), this::handleResult);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user