Skip to content
Merged

This file was deleted.

17 changes: 17 additions & 0 deletions app/src/main/java/io/github/aedev/flow/ui/AppHooks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ import io.github.aedev.flow.R
import io.github.aedev.flow.data.shorts.queue.ShortsQueueSource
import io.github.aedev.flow.utils.NetworkConnectivityObserver
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.first

/** Navigates to a route handed in from outside the graph, once the graph has its first entry. */
@Composable
fun HandlePendingRoute(
pendingRoute: String?,
navController: NavController,
onConsumed: () -> Unit,
) {
LaunchedEffect(pendingRoute) {
pendingRoute?.let { route ->
navController.currentBackStackEntryFlow.first()
navController.navigate(route)
onConsumed()
}
}
}

@Composable
fun HandleDeepLinks(
Expand Down
Loading
Loading