Skip to content

Commit

Permalink
chore: revert deprecation on Jetpack Compose APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainbsl committed Dec 2, 2024
1 parent b3cc6a9 commit db87bf3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ plugins {

allprojects {
group = "org.kodein.di"
version = "7.23.0"
version = "7.23.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ public inline fun <reified VM : ViewModel> viewModel(
* @throws DI.DependencyLoopException If the value construction triggered a dependency loop.
*/
@Composable
@Deprecated(
message = "Use the new Compose Multiplatform rememberViewModel instead from Kodein Framework Compose",
ReplaceWith("rememberViewModel", "org.kodein.di.compose.viewmodel"),
DeprecationLevel.WARNING
)
@Suppress("DEPRECATION")
public inline fun <reified A : Any, reified VM : ViewModel> rememberViewModel(
tag: String? = null,
arg: A,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ import org.kodein.di.instance
* @throws DI.DependencyLoopException If the value construction triggered a dependency loop.
*/
@Composable
@Deprecated(
message = "Use the new Compose Multiplatform rememberViewModel instead",
ReplaceWith("rememberViewModel", "org.kodein.di.compose.viewmodel"),
DeprecationLevel.WARNING
)
public inline fun <reified VM : ViewModel> rememberViewModel(tag: Any? = null): ViewModelLazy<VM> = with(localDI()) {
val viewModelStoreOwner = LocalViewModelStoreOwner.current ?: error("")

Expand Down Expand Up @@ -57,11 +52,6 @@ public inline fun <reified VM : ViewModel> rememberViewModel(tag: Any? = null):
* @throws DI.DependencyLoopException If the value construction triggered a dependency loop.
*/
@Composable
@Deprecated(
message = "Use the new Compose Multiplatform rememberViewModel instead",
ReplaceWith("rememberViewModel", "org.kodein.di.compose.viewmodel"),
DeprecationLevel.WARNING
)
public inline fun <reified A: Any, reified VM : ViewModel> rememberViewModel(tag: Any? = null, arg: A): ViewModelLazy<VM> = with(localDI()) {
val viewModelStoreOwner = LocalViewModelStoreOwner.current ?: error("")

Expand Down

0 comments on commit db87bf3

Please sign in to comment.