Skip to content

Commit c005afb

Browse files
committed
Remove unneeded code and adjust the code format to be consistent
1 parent c547df5 commit c005afb

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

lifecycle-viewmodel/src/composeUiMain/kotlin/ViewModel.composeUi.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ actual fun <VM : ViewModel> viewModel(
2929

3030
@Composable
3131
actual inline fun <reified VM : ViewModel> viewModel(
32-
viewModelStoreOwner: ViewModelStoreOwner, key: String?, noinline initializer: CreationExtras.() -> VM
32+
viewModelStoreOwner: ViewModelStoreOwner,
33+
key: String?,
34+
noinline initializer: CreationExtras.() -> VM
3335
): VM =
3436
composeUiViewModel(viewModelStoreOwner, key, initializer)

lifecycle-viewmodel/src/jsMain/kotlin/ViewModel.js.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,6 @@ actual inline fun <reified VM : ViewModel> viewModel(
4444
viewModelStoreOwner.defaultCreationExtras()
4545
)
4646

47-
// TODO remove
48-
/*
49-
@Composable
50-
actual inline fun <reified VM : ViewModel> viewModel(
51-
viewModelStoreOwner: ViewModelStoreOwner, key: String?, noinline initializer: CreationExtras.() -> VM
52-
): VM =
53-
remember(key) { CreationExtras.Empty.initializer() }
54-
*/
55-
5647
internal fun <VM : ViewModel> ViewModelStoreOwner.get(
5748
modelClass: KClass<VM>,
5849
key: String?,

0 commit comments

Comments
 (0)