-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Prevent double-click recorder bug #3414
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3414 +/- ##
==========================================
- Coverage 74.63% 74.59% -0.04%
==========================================
Files 285 285
Lines 10978 10987 +9
Branches 1335 1337 +2
==========================================
+ Hits 8193 8196 +3
- Misses 2401 2407 +6
Partials 384 384
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -34,6 +45,8 @@ export default function AudioRecorder(props: RecorderProps): ReactElement { | |||
// Prevent starting a recording before a previous one is finished. | |||
await stopRecording(); | |||
|
|||
setClicked(true); |
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.
Since this is after an await it's possible that the user clicks it in-between no?
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.
Good point.
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.
Reviewed 3 of 3 files at r2, all commit messages.
Dismissed @hahn-kev from a discussion.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @hahn-kev)
Fixes #3411 and prevents trying to upload an empty audio file.
Stress-test with rapid repeated clicks on the same record button. Then pause a do a normal recording on the same button.
This change is