Skip to content

Commit

Permalink
Make BackHandler a internal public api
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSrSouza committed Mar 23, 2024
1 parent 5021171 commit 8d8ea02
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
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

0 comments on commit 8d8ea02

Please sign in to comment.