package Ġcom . native bo ys . password . manager . presentation Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . h ilt . lifecycle . ViewModel Inject Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . as LiveData Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġcom . native bo ys . password . manager . data . services . UserService Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . launch Ċ Ċ class ĠMainActivity ViewModel Ġ@ ViewModel Inject Ġconstructor ( ĊĠĠĠ Ġ@ ApplicationContext Ġprivate Ġval Ġcontext : ĠContext , ĊĠĠĠ Ġprivate Ġval ĠuserService : ĠUserService Ċ ): ĠViewModel () Ġ{ ĊĊĠĠĠ Ġval Ġdark Theme Mode Ġ= ĠuserService . observe Dark Theme Mode (). as LiveData () ĊĊĠĠĠ Ġfun Ġinit If Required () Ġ= ĠviewModel Scope . launch ( context Ġ= ĠDispatch ers . IO ) Ġ{ ĊĠĠĠĠĠĠĠ ĠuserService . init Database ( context ) ĊĠĠĠ Ġ} Ċ Ċ }