diff --git a/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java b/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java index 88e404d9..97307cd4 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/View/ManualEntryDialog.java @@ -203,7 +203,9 @@ public class ManualEntryDialog { @Override public void afterTextChanged(Editable editable) { - if (TextUtils.isEmpty(labelInput.getText()) || TextUtils.isEmpty(secretInput.getText())) { + if (TextUtils.isEmpty(labelInput.getText()) || TextUtils.isEmpty(secretInput.getText()) + || TextUtils.isEmpty(periodInput.getText()) || Integer.parseInt(periodInput.getText().toString()) == 0 + || TextUtils.isEmpty(digitsInput.getText()) || Integer.parseInt(digitsInput.getText().toString()) == 0) { positiveButton.setEnabled(false); } else { positiveButton.setEnabled(true); @@ -213,5 +215,7 @@ public class ManualEntryDialog { labelInput.addTextChangedListener(watcher); secretInput.addTextChangedListener(watcher); + periodInput.addTextChangedListener(watcher); + digitsInput.addTextChangedListener(watcher); } }