Skip to content

Commit

Permalink
fix: use correct getViewModel
Browse files Browse the repository at this point in the history
  • Loading branch information
CnC-Robert committed Jun 4, 2023
1 parent e088d05 commit 1be9c9c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import dev.olshevski.navigation.reimagined.rememberNavController
import me.zhanghai.android.appiconloader.coil.AppIconFetcher
import me.zhanghai.android.appiconloader.coil.AppIconKeyer
import org.koin.android.ext.android.get
import org.koin.androidx.viewmodel.ext.android.getViewModel
import org.koin.androidx.compose.getViewModel
import org.koin.androidx.viewmodel.ext.android.getViewModel as getActivityViewModel
import org.koin.core.parameter.parametersOf
import kotlin.math.roundToInt

Expand All @@ -40,7 +41,7 @@ class MainActivity : ComponentActivity() {

installSplashScreen()

getViewModel<MainViewModel>()
getActivityViewModel<MainViewModel>()

val scale = this.resources.displayMetrics.density
val pixels = (36 * scale).roundToInt()
Expand Down

0 comments on commit 1be9c9c

Please sign in to comment.