Add scaffolding for backupsV2.

This commit is contained in:
Alex Hart
2024-01-31 16:27:18 -04:00
committed by Nicholas Tinsley
parent 91920319c7
commit 1234c63836
27 changed files with 1551 additions and 20 deletions

View File

@@ -52,6 +52,15 @@ class SavedStateViewModelFactory<MODEL : ViewModel>(
}
}
@MainThread
inline fun <reified VM : ViewModel> ComponentActivity.viewModel(
noinline create: () -> VM
): Lazy<VM> {
return viewModels(
factoryProducer = ViewModelFactory.factoryProducer(create)
)
}
@MainThread
inline fun <reified VM : ViewModel> Fragment.viewModel(
noinline create: () -> VM