naman14 / TimberX

Material theme music player that works across all form factors (phones, wear, auto, cast, assistant) and uses latest tools (Kotlin, Architecture components, Room, Databinding)

Home Page:https://namand.in

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Context reference inside MainViewModel

DerrickRocha opened this issue · comments

I noticed you guys have a reference to a Context inside the MainViewModel. I thought viewmodels were not supposed to reference a view, Lifecycle, or any class that may hold a reference to the activity context. Am I missing something here?

They may be misusing viewmodels, in that case there's a AndroidViewModel if you need the app context.