From 97bb4532fc28485f524e0640c46ebd6335d22d2d Mon Sep 17 00:00:00 2001 From: Gabriel Souza Date: Tue, 21 May 2024 11:11:54 +0200 Subject: [PATCH] Fix lint --- .../adriel/voyager/core/lifecycle/NavigatorScreenLifecycle.kt | 1 - .../voyager/jetpack/AndroidScreenLifecycleOwner.android.kt | 2 -- .../kotlin/cafe/adriel/voyager/jetpack/LifecycleProvider.kt | 1 - .../cafe/adriel/voyager/jetpack/VoyagerLifecycleKMPOwner.kt | 2 -- .../commonMain/kotlin/cafe/adriel/voyager/jetpack/navigator.kt | 2 +- .../voyager/jetpack/AndroidScreenLifecycleOwner.nonAndroid.kt | 2 -- 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/NavigatorScreenLifecycle.kt b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/NavigatorScreenLifecycle.kt index 3bfe9e1e..816ce844 100644 --- a/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/NavigatorScreenLifecycle.kt +++ b/voyager-core/src/commonMain/kotlin/cafe/adriel/voyager/core/lifecycle/NavigatorScreenLifecycle.kt @@ -14,4 +14,3 @@ public interface NavigatorScreenLifecycleProvider { public fun provide(screen: Screen): List } - diff --git a/voyager-lifecycle-kmp/src/androidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.android.kt b/voyager-lifecycle-kmp/src/androidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.android.kt index 490ff04c..0e9effc7 100644 --- a/voyager-lifecycle-kmp/src/androidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.android.kt +++ b/voyager-lifecycle-kmp/src/androidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.android.kt @@ -1,9 +1,7 @@ package cafe.adriel.voyager.jetpack -import android.app.Activity import android.app.Application import android.content.Context -import android.content.ContextWrapper import androidx.compose.runtime.Composable import androidx.compose.runtime.ProvidedValue import androidx.compose.ui.platform.LocalContext diff --git a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/LifecycleProvider.kt b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/LifecycleProvider.kt index e2c2c733..f97e4505 100644 --- a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/LifecycleProvider.kt +++ b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/LifecycleProvider.kt @@ -29,5 +29,4 @@ public fun ProvideNavigatorLifecycleKMPSupport( public class JetpackSupportProvider : NavigatorScreenLifecycleProvider { override fun provide(screen: Screen): List = listOf(ScreenLifecycleStore.get(screen) { ScreenLifecycleKMPOwner() }) - } diff --git a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/VoyagerLifecycleKMPOwner.kt b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/VoyagerLifecycleKMPOwner.kt index b98eebec..c65ada00 100644 --- a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/VoyagerLifecycleKMPOwner.kt +++ b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/VoyagerLifecycleKMPOwner.kt @@ -188,8 +188,6 @@ public class VoyagerLifecycleKMPOwner : } } - - private fun LifecycleRegistry.safeHandleLifecycleEvent(event: Lifecycle.Event) { val currentState = currentState if (!currentState.isAtLeast(Lifecycle.State.INITIALIZED)) return diff --git a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/navigator.kt b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/navigator.kt index 7f67bef6..ab1c8263 100644 --- a/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/navigator.kt +++ b/voyager-lifecycle-kmp/src/commonMain/kotlin/cafe/adriel/voyager/jetpack/navigator.kt @@ -49,5 +49,5 @@ public inline fun navigatorViewModel( viewModelStoreOwner = viewModelStoreOwner, key = key, factory = factory, - extras = extras, + extras = extras ) diff --git a/voyager-lifecycle-kmp/src/nonAndroidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.nonAndroid.kt b/voyager-lifecycle-kmp/src/nonAndroidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.nonAndroid.kt index f0b66d2c..d182bcf6 100644 --- a/voyager-lifecycle-kmp/src/nonAndroidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.nonAndroid.kt +++ b/voyager-lifecycle-kmp/src/nonAndroidMain/kotlin/cafe/adriel/voyager/jetpack/AndroidScreenLifecycleOwner.nonAndroid.kt @@ -11,7 +11,6 @@ internal actual class SavedStateViewModelPlatform actual constructor( ) { public actual fun getDefaultViewModelProviderFactory(): ViewModelProvider.Factory { return object : ViewModelProvider.Factory { - } } @@ -21,5 +20,4 @@ internal actual class SavedStateViewModelPlatform actual constructor( public actual fun initHooks() {} public actual fun provideHooks(): List> = emptyList() - }