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

iOS: Fixed UI issues with main thread and added alert for permission. #184

Merged
merged 5 commits into from
Aug 14, 2023

Conversation

BardRedStar
Copy link
Contributor

@BardRedStar BardRedStar commented Jul 31, 2020

  • solved critical error connected with performing the UI operation on the non-UI thread.
  • added the alert dialog for the Microphone permission, if it is not granted.

Platforms affected

iOS

Motivation and Context

App was crashing, when user didn't give permissions for recording audio.

Description

iOS requests the permission on the background thread, and after it all of the operations should be performed on the main thread. So, I got a crash, when attempting to reject the Microphone permission prompt. Basically I change thread after the request for permissions.

Testing

I have ran tests, and haven’t got any error.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

- solved critical error connected with performing the UI operation on the non-UI thread.
- added the alert dialog for the Microphone permission, if it is not granted.
@ath0mas
Copy link
Contributor

ath0mas commented Aug 11, 2023

Please @erisu to have a look at this one too if you can.
It is almost the last open MR among the few others I merged into my ns0m fork between 2020 and 2022, and been using fine since then.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

Tested and confirmed changes

  • Pressing record will display permission dialog when permission was previously denied.
  • Pressing record will not show permission dialog when permission is granted.
  • Pressing record will not close recorder if permission was previously denied.

@erisu erisu merged commit 1796d0a into apache:master Aug 14, 2023
5 of 10 checks passed
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.

3 participants