Skip to content

Commit

Permalink
Navigate to ImageScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
codeguru42 committed Aug 5, 2023
1 parent 9d17ba3 commit 010db82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/main/java/codeguru/gocapture/ui/MainScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.core.content.FileProvider
import androidx.navigation.NavController
import androidx.navigation.NavHostController
import codeguru.gocapture.BuildConfig
import codeguru.gocapture.MainActivity
import codeguru.gocapture.R
import java.io.File

@Composable
fun MainScreen(navController: NavController, modifier: Modifier) {
fun MainScreen(navController: NavHostController, modifier: Modifier) {
Surface(
modifier = modifier,
color = MaterialTheme.colorScheme.background
Expand All @@ -43,15 +44,14 @@ fun MainScreen(navController: NavController, modifier: Modifier) {
}

@Composable
private fun ImageButton(navController: NavController) {
private fun ImageButton(navController: NavHostController) {
val launcher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.GetContent(),
onResult = {
Log.d(MainActivity::class.toString(), "get content result")
Log.d(MainActivity::class.toString(), it.toString())
if (it != null) {
// val action = MainFragmentDirections.actionImage(it.toString())
// navController.navigate(action)
navController.navigate("image")
}
}
)
Expand Down

0 comments on commit 010db82

Please sign in to comment.