-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Database bug fix #5902
Database bug fix #5902
Conversation
With this branch I always get this crash when going to Custom Picker a second time after using it once to upload 5 pictures:
Any idea what might be happening? |
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 am still seeing the above-mentioned issues but that branch is clearly an improvement.
Why did you merge this @nicolas-raoul? This issue needs to be solved in this PR. Right? |
In this block of code, the UI is also being updated which should be handled on the Main Thread. I'm sorry, I didn't notice this when replacing the Main Thread of IO Thread.
|
Description (required)
Fixes #5898
What changes did you make and why?
I added suspend keywords to
UploadStatusDao
to make the functions thread-safe. Hence, calling these functions from any thread won't block the thread until execution is complete. I also replaced the use ofMainScope()
with theCoroutineScope
for DB operations.Tests performed (required)
Tested prodDebug on Samsung A14 with API level 34.
Screenshots (for UI changes only)
None