package Ġcom . b ns an tos . offline . view model Ċ Ċ import Ġandroid . arch . lifecycle . LiveData Ċ import Ġandroid . arch . lifecycle . ViewModel Ċ import Ġcom . b ns an tos . offline . Preferences Ċ import Ġcom . b ns an tos . offline . models . Comment Ċ import Ġcom . b ns an tos . offline . repository . Comments Repository Ċ import Ġcom . b ns an tos . offline . vo . Resource Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠCreate Comment ViewModel Ġ@ Inject Ġconstructor ( private Ġval Ġm Prefs : ĠPreferences , Ġprivate Ġval Ġm Repo : ĠComments Repository ): ĠViewModel () Ġ{ ĊĊĠĠĠ Ġfun Ġcreate ( text : ĠString ): ĠLive Data < Resource < Comment >> Ġ= Ġm Repo . create ( text , Ġm Prefs . userId ) Ċ }