Fix OTP editing, Update dependencies

This commit is contained in:
MrLetsplay 2023-09-24 16:27:44 +02:00
parent 90590936df
commit e136fdad91
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg
3 changed files with 5 additions and 4 deletions

View File

@ -73,13 +73,13 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2' implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2' implementation 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
implementation 'androidx.navigation:navigation-fragment:2.7.2' implementation 'androidx.navigation:navigation-fragment:2.7.3'
implementation 'androidx.navigation:navigation-ui:2.7.2' implementation 'androidx.navigation:navigation-ui:2.7.3'
testImplementation 'junit:junit:4.13.2' testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation "androidx.biometric:biometric:1.1.0" implementation "androidx.biometric:biometric:1.1.0"
implementation 'com.cringe_studios:CringeAuthenticatorLibrary:1.5' implementation 'com.cringe_studios:CringeAuthenticatorLibrary:1.6'
implementation 'com.google.mlkit:barcode-scanning:17.2.0' implementation 'com.google.mlkit:barcode-scanning:17.2.0'
implementation 'com.google.code.gson:gson:2.10.1' implementation 'com.google.code.gson:gson:2.10.1'
implementation 'androidx.activity:activity:1.7.2' implementation 'androidx.activity:activity:1.7.2'

View File

@ -191,6 +191,7 @@ public class GroupFragment extends NamedFragment {
} }
saveOTPs(); saveOTPs();
finishEditing();
}) })
.setNegativeButton(R.string.no, (d, w) -> {}) .setNegativeButton(R.string.no, (d, w) -> {})
.show(); .show();

View File

@ -172,7 +172,7 @@ public class DialogUtil {
int counter = Integer.parseInt(binding.inputCounter.getText().toString()); int counter = Integer.parseInt(binding.inputCounter.getText().toString());
boolean checksum = binding.inputChecksum.isChecked(); boolean checksum = binding.inputChecksum.isChecked();
OTPData data = new OTPData(name, issuer, OTPType.TOTP, secret, algorithm, digits, 0, counter, checksum); OTPData data = new OTPData(name, issuer, OTPType.HOTP, secret, algorithm, digits, 0, counter, checksum);
String errorMessage = data.validate(); String errorMessage = data.validate();
if(errorMessage != null) { if(errorMessage != null) {