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 7f947a0de74ece727eb854db71d292404d5bf30f..d4c61a613be59d0a564c6f49ef1a0f8dcf909010 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 b0b273dac348334a08d1cadacb11a41fdde98256..828bfcc9c7b3368f11243b272b2f4ccc8d0342e0 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,