From 5e12874028da9dcb5dc888923ffa8998276b16a2 Mon Sep 17 00:00:00 2001 From: Cory Chambers Date: Fri, 20 Oct 2023 06:39:17 -0400 Subject: [PATCH] Fix version for andriod. Fixed sentry issues where 1) it was dispatching incorrectly and 2) check that route has name before dispatching action. --- android/app/build.gradle | 4 ++-- src/actions/session.js | 2 +- src/navigation/RootNavigator.js | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index e099b8c5..6b8d2efc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -78,8 +78,8 @@ android { applicationId "com.zooniversemobile" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 60 - versionName "2.10.2" + versionCode 61 + versionName "2.10.0" } signingConfigs { debug { diff --git a/src/actions/session.js b/src/actions/session.js index 47ea0721..cd38a864 100644 --- a/src/actions/session.js +++ b/src/actions/session.js @@ -30,7 +30,7 @@ export function setSession() { }) .catch(() => { stored = generateSessionID() - dispatch(storeSession(stored)) + storeSession(stored) dispatch(setState('session', stored)) }); }; diff --git a/src/navigation/RootNavigator.js b/src/navigation/RootNavigator.js index c3f26233..861a0c2e 100644 --- a/src/navigation/RootNavigator.js +++ b/src/navigation/RootNavigator.js @@ -112,7 +112,10 @@ const RootNavigator = () => { ref={navRef} onStateChange={() => { const newRoute = navRef.getCurrentRoute(); - dispatch(setPageShowing(newRoute.name)); + // Make sure the newRoute has a name. + if (newRoute?.name) { + dispatch(setPageShowing(newRoute.name)); + } }}>