-
-
Notifications
You must be signed in to change notification settings - Fork 879
Remove appdatabase get instance #6234
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
Conversation
common/src/main/kotlin/io/homeassistant/companion/android/database/migration/Utils.kt
Show resolved
Hide resolved
jpelgrom
left a comment
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.
Sometimes you're using val dao = ..., sometimes it is val sensorDao = ... (example). Try to be consistent. My preference would be to use a specific name (sensorDao), reducing changed lines, or at least use the specific name if any other DAO is accessed in the same file to prevent mixups.
Summary
Remove the need of
AppDatabase.getInstanceand removing the synchronization block from it. It might help reduce some ANR.Checklist
Any other notes
Closes #5702