mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
chore: inject VM with Lifecycle-ViewModel-Compose integration
This commit is contained in:
@@ -72,6 +72,7 @@ dependencies {
|
||||
implementation(libs.androidx.documentfile)
|
||||
implementation(libs.androidx.fragment.ktx)
|
||||
implementation(libs.bundles.androidxLifecycle)
|
||||
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
||||
implementation(libs.androidx.material)
|
||||
implementation(libs.androidx.preference)
|
||||
implementation(libs.androidx.recyclerview)
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user