From 2f0555484e4c7da53d529042684dcfb505aa6bd0 Mon Sep 17 00:00:00 2001 From: Nacho Date: Sat, 4 Jan 2025 16:47:25 +0100 Subject: [PATCH] Forgot to reset the state of the scan... Thus making scan innaccessible --- app/src/main/java/com/github/nacabaro/vbhelper/MainActivity.kt | 3 +++ .../com/github/nacabaro/vbhelper/navigation/AppNavigation.kt | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/com/github/nacabaro/vbhelper/MainActivity.kt b/app/src/main/java/com/github/nacabaro/vbhelper/MainActivity.kt index 7f947a0..d4c61a6 100644 --- a/app/src/main/java/com/github/nacabaro/vbhelper/MainActivity.kt +++ b/app/src/main/java/com/github/nacabaro/vbhelper/MainActivity.kt @@ -63,6 +63,9 @@ class MainActivity : ComponentActivity() { isDoneReadingCharacter = true "Done reading character" } + }, + onClickScan = { + isDoneReadingCharacter = false } ) } diff --git a/app/src/main/java/com/github/nacabaro/vbhelper/navigation/AppNavigation.kt b/app/src/main/java/com/github/nacabaro/vbhelper/navigation/AppNavigation.kt index b0b273d..828bfcc 100644 --- a/app/src/main/java/com/github/nacabaro/vbhelper/navigation/AppNavigation.kt +++ b/app/src/main/java/com/github/nacabaro/vbhelper/navigation/AppNavigation.kt @@ -16,6 +16,7 @@ import com.github.nacabaro.vbhelper.screens.StorageScreen @Composable fun AppNavigation( onClickRead: () -> Unit, + onClickScan: () -> Unit, isDoneReadingCharacter: Boolean ) { val navController = rememberNavController() @@ -41,6 +42,7 @@ fun AppNavigation( StorageScreen() } composable(BottomNavItem.Scan.route) { + onClickScan() ScanScreen( navController = navController, onClickRead = onClickRead,