Skip to content

Instantly share code, notes, and snippets.

@Nyame123
Created June 10, 2021 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nyame123/e01b0af6fb013e4e08c407391c79e782 to your computer and use it in GitHub Desktop.
Save Nyame123/e01b0af6fb013e4e08c407391c79e782 to your computer and use it in GitHub Desktop.
@HiltViewModel
class MainActivityViewModel @Inject constructor(private val appDatabase: AppDatabase): ViewModel(){
fun getDatabase(): List<Readings?>? {
return appDatabase.readingDao()!!.filterReadings("%%")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment