You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor: Move "My Library" data loading to ViewModel
Refactored `BaseDashboardFragment` to use `DashboardViewModel` for fetching the "My Library" data.
- Injected `DashboardViewModel` into `BaseDashboardFragment` using Hilt.
- Moved the Realm query for library items from the fragment to a `suspend` function in the ViewModel.
- The fragment now calls the ViewModel from a `lifecycleScope` coroutine to load the data asynchronously.
- This change moves a database query off the main thread, improving performance and adhering to a better architectural pattern by separating UI and data concerns.
0 commit comments