Fix microphone permission checking for audio recording
See [#5580][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5580
This commit is contained in:
parent
1dc353f089
commit
79b3b6408e
8 changed files with 69 additions and 43 deletions
|
@ -77,8 +77,10 @@ function startRecording(): ThunkAction<
|
|||
return;
|
||||
}
|
||||
|
||||
let recordingStarted = false;
|
||||
|
||||
try {
|
||||
await recorder.start();
|
||||
recordingStarted = await recorder.start();
|
||||
} catch (err) {
|
||||
dispatch({
|
||||
type: ERROR_RECORDING,
|
||||
|
@ -87,10 +89,12 @@ function startRecording(): ThunkAction<
|
|||
return;
|
||||
}
|
||||
|
||||
dispatch({
|
||||
type: START_RECORDING,
|
||||
payload: undefined,
|
||||
});
|
||||
if (recordingStarted) {
|
||||
dispatch({
|
||||
type: START_RECORDING,
|
||||
payload: undefined,
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue