Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BackHandler a internal public api #376

Merged
merged 2 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions voyager-navigator/api/android/voyager-navigator.api
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public final class cafe/adriel/voyager/navigator/VoyagerNavigatorSaverException
public fun <init> (Ljava/lang/String;)V
}

public final class cafe/adriel/voyager/navigator/internal/ActualsKt {
}

public abstract interface class cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable {
public abstract fun onDispose (Lcafe/adriel/voyager/navigator/Navigator;)V
}
Expand Down
3 changes: 3 additions & 0 deletions voyager-navigator/api/desktop/voyager-navigator.api
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public final class cafe/adriel/voyager/navigator/NavigatorSaverKt {
public static final fun getLocalNavigatorSaver ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public final class cafe/adriel/voyager/navigator/internal/ActualsKt {
}

public abstract interface class cafe/adriel/voyager/navigator/lifecycle/NavigatorDisposable {
public abstract fun onDispose (Lcafe/adriel/voyager/navigator/Navigator;)V
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package cafe.adriel.voyager.navigator.internal

import androidx.activity.compose.BackHandler
import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi

@InternalVoyagerApi
@Composable
internal actual fun BackHandler(enabled: Boolean, onBack: () -> Unit) = BackHandler(enabled, onBack)
public actual fun BackHandler(enabled: Boolean, onBack: () -> Unit): Unit = BackHandler(enabled, onBack)
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package cafe.adriel.voyager.navigator.internal

import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi
import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.navigator.OnBackPressed

@InternalVoyagerApi
@Composable
internal expect fun BackHandler(enabled: Boolean, onBack: () -> Unit)
public expect fun BackHandler(enabled: Boolean, onBack: () -> Unit)

@Composable
internal fun NavigatorBackHandler(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cafe.adriel.voyager.navigator.internal

import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi

@InternalVoyagerApi
@Composable
internal actual fun BackHandler(enabled: Boolean, onBack: () -> Unit) = Unit
public actual fun BackHandler(enabled: Boolean, onBack: () -> Unit): Unit = Unit
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cafe.adriel.voyager.navigator.internal

import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi

@InternalVoyagerApi
@Composable
internal actual fun BackHandler(enabled: Boolean, onBack: () -> Unit) = Unit
public actual fun BackHandler(enabled: Boolean, onBack: () -> Unit): Unit = Unit
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package cafe.adriel.voyager.navigator.internal

import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi

// TODO: use ios backstack
@InternalVoyagerApi
@Composable
internal actual fun BackHandler(enabled: Boolean, onBack: () -> Unit) = Unit
public actual fun BackHandler(enabled: Boolean, onBack: () -> Unit): Unit = Unit
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package cafe.adriel.voyager.navigator.internal

import androidx.compose.runtime.Composable
import cafe.adriel.voyager.core.annotation.InternalVoyagerApi

@InternalVoyagerApi
@Composable
internal actual fun BackHandler(enabled: Boolean, onBack: () -> Unit) = Unit
public actual fun BackHandler(enabled: Boolean, onBack: () -> Unit): Unit = Unit
Loading