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

Move all database queries off the ui thread & add a ViewModel for MainActivity #4786

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

connyduck
Copy link
Collaborator

@connyduck connyduck commented Dec 3, 2024

  • Move all database queries off the ui thread - this is a massive performance improvement
  • ViewModel for MainActivity - this makes MainActivity smaller and network requests won't be retried when rotating the screen
  • removes the Push Notification Migration feature. We had it long enough, all users who want push notifications should be migrated by now
  • AccountEntity is now immutable
  • The header image of Accounts is now cached as well

@@ -46,7 +46,6 @@ object StorageModule {
fun providesDatabase(@ApplicationContext appContext: Context, converters: Converters): AppDatabase {
return Room.databaseBuilder(appContext, AppDatabase::class.java, "tuskyDB")
.addTypeConverter(converters)
.allowMainThreadQueries()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🥳

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.

1 participant