From d838ed6b5fd957555aec15a73a8d03a60b553921 Mon Sep 17 00:00:00 2001 From: Wing <44992537+wingio@users.noreply.github.com> Date: Tue, 27 Aug 2024 22:40:41 -0400 Subject: [PATCH] Fix crash on login Closes #45 --- .../src/main/java/com/materiiapps/gloom/ui/GloomActivity.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/android/src/main/java/com/materiiapps/gloom/ui/GloomActivity.kt b/app/android/src/main/java/com/materiiapps/gloom/ui/GloomActivity.kt index b56dbb7..541406f 100644 --- a/app/android/src/main/java/com/materiiapps/gloom/ui/GloomActivity.kt +++ b/app/android/src/main/java/com/materiiapps/gloom/ui/GloomActivity.kt @@ -35,7 +35,7 @@ class GloomActivity : ComponentActivity() { private val auth: AuthManager by inject() private lateinit var navigator: Navigator - private var isLastIntentOauth: Boolean = intent?.isOAuthUri() ?: false + private var isLastIntentOauth: Boolean = false override fun onCreate(savedInstanceState: Bundle?) { installSplashScreen() @@ -79,6 +79,7 @@ class GloomActivity : ComponentActivity() { override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) + isLastIntentOauth = intent.isOAuthUri() if (intent.isOAuthUri()) { if (viewModel.authManager.awaitingAuthType == null) return intent.getOAuthCode()?.let { code ->