1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-04-11 11:12:03 +02:00

Mobile: Fixed biometics prompt on new devices

This commit is contained in:
Laurent Cozic 2023-01-05 13:29:19 +00:00
parent 1edb345e85
commit 9eff7e6060

@ -8,11 +8,9 @@ export interface SensorInfo {
}
export default async (): Promise<SensorInfo> => {
const enabled = Setting.value('security.biometricsEnabled');
let hasChanged = false;
let supportedSensors = '';
if (enabled) {
try {
const result = await FingerprintScanner.isSensorAvailable();
supportedSensors = result;
@ -27,10 +25,9 @@ export default async (): Promise<SensorInfo> => {
console.warn('Could not check for biometrics sensor:', error);
Setting.setValue('security.biometricsSupportedSensors', '');
}
}
return {
enabled,
enabled: Setting.value('security.biometricsEnabled'),
sensorsHaveChanged: hasChanged,
supportedSensors,
};