From a981b6b9f75797ab3d269d01bd571fc0143f2218 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 18 Nov 2022 14:24:07 +0530 Subject: chore: inject VM with Lifecycle-ViewModel-Compose integration --- app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src') diff --git a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt index 90a6d21f..6916e28b 100644 --- a/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt +++ b/app/src/main/java/app/passwordstore/ui/pgp/PGPKeyListActivity.kt @@ -17,6 +17,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource +import androidx.lifecycle.viewmodel.compose.viewModel import app.passwordstore.R import app.passwordstore.ui.APSAppBar import app.passwordstore.ui.compose.theme.APSTheme @@ -70,8 +71,8 @@ class PGPKeyListActivity : ComponentActivity() { @Composable fun PGPKeyList( - viewModel: PGPKeyListViewModel, modifier: Modifier = Modifier, + viewModel: PGPKeyListViewModel = viewModel(), ) { KeyList( identifiers = viewModel.keys, -- cgit v1.2.3