From 24e192c43b9d763a5a263519c7afdacf10c63355 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:04:57 +0000 Subject: [PATCH 1/2] Initial plan From 1f40689e19ffcceec7b529b49feff3b134ea3e20 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 08:08:20 +0000 Subject: [PATCH 2/2] Use Firebase.auth.currentUser?.uid directly to avoid race conditions Co-authored-by: maxschwinghammer <111356450+maxschwinghammer@users.noreply.github.com> --- app/src/main/java/com/freshkeeper/MainActivity.kt | 2 +- gradlew | 0 2 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 gradlew diff --git a/app/src/main/java/com/freshkeeper/MainActivity.kt b/app/src/main/java/com/freshkeeper/MainActivity.kt index 43a9955..aa0a3d1 100644 --- a/app/src/main/java/com/freshkeeper/MainActivity.kt +++ b/app/src/main/java/com/freshkeeper/MainActivity.kt @@ -87,7 +87,7 @@ class MainActivity : FragmentActivity() { } LaunchedEffect(Unit) { - if (currentUserId == null && navController?.currentDestination?.route != Screen.SignIn.route) { + if (Firebase.auth.currentUser?.uid == null && navController?.currentDestination?.route != Screen.SignIn.route) { navController?.navigate(Screen.SignIn.route) } } diff --git a/gradlew b/gradlew old mode 100644 new mode 100755