1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-21 23:17:42 +02:00

Android: Fixes #7691: Sharing file to Joplin does not work

This commit is contained in:
Laurent Cozic
2023-02-10 16:12:14 +00:00
parent 02e8307093
commit a1a10a6c55
3 changed files with 34 additions and 6 deletions

View File

@ -9,6 +9,7 @@ import { _ } from '@joplin/lib/locale';
interface Props {
themeId: number;
sensorInfo: SensorInfo;
dispatch: Function;
}
export default (props: Props) => {
@ -49,6 +50,11 @@ export default (props: Props) => {
} else {
setTryBiometricsCheck(true);
}
props.dispatch({
type: 'BIOMETRICS_DONE_SET',
value: true,
});
};
Alert.alert(
@ -67,7 +73,7 @@ export default (props: Props) => {
},
]
);
}, [initialPromptDone, props.sensorInfo.supportedSensors, display]);
}, [initialPromptDone, props.sensorInfo.supportedSensors, display, props.dispatch]);
const windowSize = useMemo(() => {
return {
@ -76,6 +82,15 @@ export default (props: Props) => {
};
}, []);
useEffect(() => {
if (!display) {
props.dispatch({
type: 'BIOMETRICS_DONE_SET',
value: true,
});
}
}, [display, props.dispatch]);
const renderTryAgainButton = () => {
if (!display || tryBiometricsCheck || !initialPromptDone) return null;
return <Button title={_('Try again')} onPress={() => setTryBiometricsCheck(true)} />;