Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fingerprint dialog called twice #1100

Merged
merged 3 commits into from
Jun 22, 2020

Conversation

ebma
Copy link
Member

@ebma ebma commented Jun 16, 2020

Only use props.onToggle as onClick handler for the whole item instead of using it for item and <SettingsToggle>. Otherwise it would be called twice when the toggle is clicked.
(onChange is a required prop of <SettingsToggle> so () => undefined is passed instead)

Reject the bio-auth test with a CustomError to prevent an uncaught promise being thrown by getErrorTranslation().

Closes #1077.

ebma added 2 commits June 9, 2020 18:21
Calling event.stopPropagation() worked neither on the SettingsToggle nor
on the AppSettingsItem component
@@ -64,7 +64,7 @@ export const BiometricLockSetting = React.memo(function BiometricLockSetting(pro
return (
<AppSettingsItem
actions={
<SettingsToggle checked={props.enrolled && props.value} disabled={!props.enrolled} onChange={props.onToggle} />
<SettingsToggle checked={props.enrolled && props.value} disabled={!props.enrolled} onChange={() => undefined} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a comment here why we set a do-nothing click handler here. LGTM afterwards 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@andywer andywer merged commit 75dc264 into master Jun 22, 2020
@andywer andywer deleted the bugfix/1077-fingerprint-dialog-called-twice branch June 22, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: enabling fingerprint lock fails w/ BIOMETRIC_DISMISSED
2 participants