-
Notifications
You must be signed in to change notification settings - Fork 25
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
Ai camera shutter button not tappable after first press #2848
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I unfortunately can't test that this is working, since I haven't been able to tap more than once on the shutter button in the AICamera in the first place. But I still can't tap more than once in this branch, and I stuck with a code-related review.
@@ -59,7 +59,7 @@ | |||
</Testables> | |||
</TestAction> | |||
<LaunchAction | |||
buildConfiguration = "Debug" | |||
buildConfiguration = "Release" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not change this in this PR.
}; | ||
|
||
const isDisabled = disabled || ( preventMultipleTaps && isProcessing ); | ||
|
||
return ( | ||
<Pressable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being a tiny bit forward thinking here, can we move this logic into a SharedComponent, maybe called PressableWithDebounce
? I'm assuming a few things here:
- we'll want this logic on other buttons throughout the app (maybe even in the camera, on the gallery button for example)
- it would be nice to be able to quickly swap out a
Pressable
for aPressableWithDebounce
in case we run into any timing issues with this (here or elsewhere) - it's nicer to standardize the debounce time in a single location, rather than making
TakePhoto
responsible for receiving props and knowing how long to debounce
based off of solution for #2833