You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-30 23:44:55 +02:00
Mobile: Fixed biometics prompt on new devices
This commit is contained in:
@ -8,11 +8,9 @@ export interface SensorInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async (): Promise<SensorInfo> => {
|
export default async (): Promise<SensorInfo> => {
|
||||||
const enabled = Setting.value('security.biometricsEnabled');
|
|
||||||
let hasChanged = false;
|
let hasChanged = false;
|
||||||
let supportedSensors = '';
|
let supportedSensors = '';
|
||||||
|
|
||||||
if (enabled) {
|
|
||||||
try {
|
try {
|
||||||
const result = await FingerprintScanner.isSensorAvailable();
|
const result = await FingerprintScanner.isSensorAvailable();
|
||||||
supportedSensors = result;
|
supportedSensors = result;
|
||||||
@ -27,10 +25,9 @@ export default async (): Promise<SensorInfo> => {
|
|||||||
console.warn('Could not check for biometrics sensor:', error);
|
console.warn('Could not check for biometrics sensor:', error);
|
||||||
Setting.setValue('security.biometricsSupportedSensors', '');
|
Setting.setValue('security.biometricsSupportedSensors', '');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
enabled,
|
enabled: Setting.value('security.biometricsEnabled'),
|
||||||
sensorsHaveChanged: hasChanged,
|
sensorsHaveChanged: hasChanged,
|
||||||
supportedSensors,
|
supportedSensors,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user