From 4699fa9d6c1997f58ce5c3f0491d77215c82d5bb Mon Sep 17 00:00:00 2001 From: Momin Tahir Date: Sat, 21 Sep 2024 03:42:20 +0500 Subject: [PATCH] make view model instance as private in MainActivity (#1621) --- .../kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt index cffb13f340..599bd0b356 100644 --- a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt +++ b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/MainActivity.kt @@ -75,7 +75,7 @@ class MainActivity : ComponentActivity() { @Inject lateinit var userNewsResourceRepository: UserNewsResourceRepository - val viewModel: MainActivityViewModel by viewModels() + private val viewModel: MainActivityViewModel by viewModels() override fun onCreate(savedInstanceState: Bundle?) { val splashScreen = installSplashScreen()